Hi i am making a game with Corona SDK. I have a moving ball (physical object) to monitor. I need an event when the ball stops. If i set DrawMode
to hybrid
, i can see the ball changes color when it stops moving. Is there any built-in event available to check if the ball is stopped moving or any other way to check? Any help is appreciated.
Ok, found what i wanted. There is boolean property for each object isAwake
which returns the awake state of object. If ball is moving it returns true
otherwise false
. Now i am checking this property with 1500ms of timer. http://docs.coronalabs.com/api/type/Body/isAwake.html
Please reply if anyone has better solution.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.