Due to the amount of objects transitioning on the screen, I’m not able to “remember” where transitions left off and start them back up.
For example, I have a table of enemies that are on the screen. They all use different transition properties, such as longer delays or faster movements.
My request is a pause function. If it’s not feasible for pausing the entire game on its own, at least a pause function for transitions.
In my opinion this is a necessary feature that almost breaks the game-creation potential of Corona without it.
[import]uid: 7366 topic_id: 1363 reply_id: 301363[/import]
I think what would be best would be individual pausing.
That way the pausing of transitions is more flexible;
For example, I could have a “freeze all enemies” powerup which would pause the enemy movement but not the movement of other game objects currently transitioning. After X seconds I could loop through all of the enemies and resume their transitions.
The functions that should be available under the transition class:
.pause and .resume [import]uid: 7366 topic_id: 1363 reply_id: 3759[/import]
I’ve added this to our user-contributed issue tracker, so you can follow the status of this feature request. It’s definitely a frequently requested feature.
Then resuming the animation can be done by simply re-adding the event listener. The object should maintain it’s alpha, x, y, and other properties and pick up where it left off, e.g.
@ Gilbert. Thanks for the info. I am now trying to implement this. Unfortunately this makes it hard to use easing function and more features. It’s also complicated to pause timers. A low level pause function similar to when you turn off or lock your phone would be great. I hope it makes it in the next release or soon after.
I second amigoni’s request to pause timers in addition to animations/transitions. In fact this should be a low level app function that pauses everything - timers, animations, physics (in Game Edition), audio. When the game is unpaused, it should return the time in milliseconds that the app was paused so we can account for that in time-based functions. It might also be beneficial to specify what we want to pause - for example, I may not want to pause timers on certain apps that perform functions at a specific time of day, or I may want the audio to still play while a game is paused.