Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Marckeeling on January 22, 2015, 12:31:15 PM
-
Hi
I have made an animation of a 'selection bar' out of 15 frames.
When the user pushes down on the keyboard, the anim will play and stop on the last frame.
Ive played around with a few of the 2D animation scripts but having trouble working out the best one to use.
Ive attached an mp4 of what im trying to do, and the sprite sheet.
-
UI2DSpriteAnimation can do that for you. Choose the framerate, turn off looping, set the 2D sprites in order, and it will do the rest when you Play() it. If you don't want it to play on start, disable the script. Calling Play() will enable it automatically.
If you're using NGUI sprites instead of 2D sprites you can achieve the same thing using UISpriteAnimation instead.