Ok, so LuaGravity seems to be more of a concept than something that is actually used.
Anyway, I liked some of the ideas and they can sort of be implemented with coroutines anyway, so I rewrote the HelloBall example using coroutines. It's about 5 lines shorter and much more interesting to read in my opinion. The if's are gone and replaced with whiles. I could have left in the local x and y variables but decided it was safer to do it this way (if there were other ways of setting the ball position).
Ooh, neat! I read about lua gravity after reading your first post which then led me to coroutines which then led me nowhere .... I couldn't exactly see how to use them in Gideros.
Oh I'm wrong, it's 6 lines longer. And I think how I'm controlling one variable is kind of inefficient. But I can see this working to control an AI or game timeline really well.
Comments
Anyway, I liked some of the ideas and they can sort of be implemented with coroutines anyway, so I rewrote the HelloBall example using coroutines. It's about 5 lines shorter and much more interesting to read in my opinion. The if's are gone and replaced with whiles. I could have left in the local x and y variables but decided it was safer to do it this way (if there were other ways of setting the ball position).
The original HelloBall is here:
http://www.giderosmobile.com/documentation/getting_started.html
Likes: ndoss
My apps: http://www.yummyyellow.com
This example helps greatly! Thanks!
My apps: http://www.yummyyellow.com