2D Toolkit Forum
2D Toolkit => Support => Topic started by: JakeTBear on February 07, 2014, 08:31:15 pm
-
Hello,
I have a sprite that doesnt animate, but upon click I want to change it into an animated sprite, I have thought of some ways of doing it (swapping the object for an animated sprite version) but I was wondering if there was another way to do this (in script), any direction towards the best solution would be highly appreciated! thanks :D
-
In tk2d 2.0 onwards, the animator is separate to the sprite. All you need to do is turn off the animator (GetComponent<tk2dSpriteAnimator>().enabled = false) if you don't want it to animate.
-
So there 's no need to have an "animated sprite" to have animations? they just need an sprite animator? can I give them this sprite animator at run time (with proper set up, as in giving them the right animation to play).
Thanks again!
-
The sprite animator is attached to a sprite (any kind of sprite). You still need the sprite itself, but the animator is separate, unlike tk2d 1.x