I’m thinking ( or wanting, hehe ) both the transitions and the timers to have pause/resume capability. Much like the TweenLite class for Actionscript.
With this, we could have tables of transitions and timers that we could loop through and pause or resume at once.
This seems like a no-brainer to me. And I don’t really want to do programmatic animation, since tweening engines have been around so long, and us seasoned old Flash developers have become so accustomed to the convenience of tween chaining, grouping, easing, reversing, sequencing, etc.
Makes me want to rewrite TweenLite in Lua, but that would take forever. All I’d like is pause/resume.
+1
I am even writing my Controller code in such a way that it is ready to accomodate PAUSE functionality for timers, listeners and especially transitions. This is essential for games…
Extending transitions to support repeat, sequence, reverse and other candies would also be very helpful. [import]uid: 7356 topic_id: 2972 reply_id: 8548[/import]
Actually, I just wrote my own transition library module that does mostly what TweenLite is capable of. DelayedCallTo, as well. Figured I gotta have it, so…
Corona guys, it’s easy. just add a “paused” boolean property to your class. Bypass the value-transforming portion of your code if it’s true. [import]uid: 4454 topic_id: 2972 reply_id: 8806[/import]
Currently, is there any way, or even a workaround, to pause/resume a timer ?
My game is going to be very timers-depended and I realize that I will not be able to implement a pause functionality. Gosh! [import]uid: 7356 topic_id: 2972 reply_id: 8860[/import]
If you want a work around, canceling a timer and recreating it works just fine. This also works with transitions if you use math to set all of your settings. [import]uid: 8702 topic_id: 2972 reply_id: 9637[/import]
I have a number of repeating transitions, all with different lengths. If the system’s paused I start a time accumulator. When resumed I want to subtract this value from the time parameter in the easing callback. When the animation is finished and re-triggers I want to reset this accumulator.
In other words I need each transition to keep track of its time offset.
But I’m not sure how to get this info from within the callback so that it matches to the exact object that contains the transition that the easing function is called by. It’s customary in C, for example to provide a userdata, field to a callback so it knows its context. I wonder what the Lua solution would be? [import]uid: 3953 topic_id: 2972 reply_id: 10462[/import]
Nice work Karnak! I’ve got one question though, does the new-function of transitionManager conflict with Director’s Class’ new-function? Referring to the tm.new() line used in your tutorial [import]uid: 14018 topic_id: 2972 reply_id: 26303[/import]
@karnakgames: Thanks for sharing your module. I was already planning to look into a module for this purpose from horacebury, so I’ll look at yours too. I was initially planning to write my own module for this purpose, but once I started seeing how many other people have already done this I figured I’ll find my favorite and use that. [import]uid: 12108 topic_id: 2972 reply_id: 26910[/import]
Transition Manager is great, but anyway to pause one transition instance rather than pause all? [import]uid: 74676 topic_id: 2972 reply_id: 55461[/import]