original article, reprint please specify: reprinted from all-ipad.net This article link address: Transition Manager for Corona Sdk:pause, Resume and Manage all Tran Sitions in a scene
If you use the corona transition function to find that you want to suspend a transform, you can only cancel it, and then start again when you want to recover, and you may also need to remember how long the last transformation process has been executing before you can recover.
The author of this blog provides a simple encapsulation: Transitionmanager to implement the functionality described above, so that we have a very convenient "pause" and "restore" function when using corona transformations. It is also very convenient to use, the original transition.to to replace the Transitionmgr.add can be suspended when the use of pause, restore the time with the resume, cancel the time with Cancel, everything is so natural.
Of course, this package is not omnipotent, from the example provided by it can see the problem. When the transition restore, just remember the last execution time, and then subtract the time from the total transition time, for the transition state is not fully restored, such as Easeinout, In resume, it's just a new start, not exactly the last state.
Overall is still good, the implementation of the code is also very simple, you can refer to.
Original address: http://karnakgames.com/wp/2011/03/ transition-manager-for-corona-sdk-pause-resume-and-manage-all-transitions-in-a-scene/
original article, reprint please specify: reprinted from All-ipad.net
This article link address: Transition Manager for Corona Sdk:pause, Resume and Manage all transitions in a scene