Log In  

After reading this post https://www.lexaloffle.com/bbs/?tid=38297 I got more interested in coroutines. I had originally dismissed them completely, but this article https://docs.google.com/document/d/14HzJnqKdVtBjN2vN9-rZHLR3rlgwWwDym8ehzhKRqFo got me thinking that I had missed something.

Here is my before and after wall animation code. (Flappy Bird Game) Both achieve the same result, but I feel like the coroutine version is easier to expand and update. The coroutine encapsulates the entire animation logic, including delay. While the function version has to manage more variables.

What do you think? Is the coroutine version better or worse?

P#78333 2020-06-20 15:52


[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 16:57:51 | 0.004s | Q:9