Comments (4)
That's not a bug, that's a feature :p
Actually you're keeping a reference to the Timeline "t" long after it's been
destroyed and reset by the manager. Therefore, when you call "kill()" on it,
you're killing a random timeline which is waiting in the pool. When you create
the second timeline, the engine reuse the first object, but it is already
killed and so is immediately sent back to the pool by the manager.
Actually you found a bug. In previous versions of the engine, I reset the
tweens/timelines on pooling but also on unpooling. I removed the latter in last
revision without considering your specific example.
Thanks for letting me know, I'll change this behavior so that manipulating
objects that are in the pool won't have any effect.
Original comment by aurelien.ribon
on 19 May 2012 at 7:17
- Changed state: Started
from java-universal-tween-engine.
Fixed in last commit. Tweens and timelines are reset each time they are
unpooled.
Original comment by aurelien.ribon
on 19 May 2012 at 7:25
- Changed state: Fixed
from java-universal-tween-engine.
Thanks!
I was starting to think it must be that. I sent you a PM on the badlogic forums
yesterday to that effect. There is still a question of how to safely cancel a
timeline that may already have completed. It may already have been unpooled and
in use. One workaround could be to set theuser data of your timeline to a
private member variable, then check if it still equal to that before
cancelling. Maybe it would be worth putting in a TweenManager.killKey or
something, so you can cancel a specific (group of) timeliness and/or
Tween.calls safely (since killTarget dooesnt work in this case)?
Thanks again for thebawsome lib!
Original comment by felixwatts
on 19 May 2012 at 7:42
from java-universal-tween-engine.
I answered that in libgdx forums, check your messages :)
Original comment by aurelien.ribon
on 21 May 2012 at 7:11
from java-universal-tween-engine.
Related Issues (20)
- BaseTween not passing reference to itself in the call back call. HOT 2
- callback in timeline never called. HOT 3
- Timeline (with callbacks) not repeated. HOT 9
- Add a "setProgress(float [0..1])" method to BaseTween
- BEGIN callback not called for simple tween. HOT 2
- java.lang.NoClassDefFoundError HOT 3
- TweenManager.getTimelinesCount getting exception HOT 2
- TweenManager.getTimelinesCount getting exception HOT 8
- repeatYoyo displays glitches when the animation is played backward HOT 6
- Synchronized callbacks
- Crash on Pool.get() HOT 4
- is there something wong with repeatYoyo?it cann't return to the start status. HOT 1
- Tweens with a constant velocity instead of constant time HOT 1
- Maven artifact HOT 9
- backward event callbacks not occur
- Value force set to target value instead of start value when playing backwards
- Sometime tween are not added/started HOT 3
- Found bug and fix
- public Timeline pushPause(int millis) documented to be in milliseconds when in fact in seconds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-universal-tween-engine.