Closed Snky closed 8 years ago
Could be nice to move on the new one updated, once we're sure it's stable enough. The latest one is really old, and we have no idea about performances. Note that eaze is blazing fast according to an old bench.
Hi guys. forgot about this issue. I just had to hack EazeTween so that individual tweens are pausable. it works for my purpose (pausing state transitions) and would also help to pause volume tweening or a lot of other things.
I don't see this feature in the newer EazeTween but I haven't tried it yet. making a tween pausable required maybe a dozen very short additional lines to the EazeTween class, though I didn't test it in a lot of configurations.
Basically I store the time a pause() was requested. when resume is called, I move the startTime and endTime of the tween (that EazeTween calculates on start) forward in time by currentTime - pauseTime . Which just tricks EazeTween and nothing else needs changing.
edit: seems that, this is how EazeTween does it when pauseAll/resumeAll is called - start and end times are moved forward in time for each tween. weird that this wasn't actually implemented for individual tweens, there might be a reason :|
Have not tried this with tween chaining but I don't see how bad it would be.
In any case to have that or an enhanced version in CE, we have to build a new EazeTween.swc, or as I'm doing right now, just have the library in srclib/ which is not such a big deal I think.
I'm quite interested to see your version of eazetween if that's allowed/alright with you, or perhaps if it get's pushed to ce one day, or not, whatever goes.
@SnkyGames , here you go : https://gist.github.com/gsynuh/51e12f56ce268cb20b70
changed line : 133 added : 226, 232, 677-693
Appreciated
eazetween src code now included in CE (with the pausable tween mod) (might have to re-open a topic for specific features but now pull requests can be done by anyone for EazeTween :) )
https://github.com/mayakwd/as3-eaze-tween ( continued version of EazeTween - wonder if removing a tween, has the ability to remove all tweens on a class, e.g. not just 'this.' but also inside of 'this' ( say it's a class ), remove tweens attached to this' variables. May have to request it! )
https://github.com/danro/tweenman-as3 ( Alternative | Interesting perhaps? )