2D Toolkit Forum
2D Toolkit => Support => Topic started by: wijesijp on May 09, 2013, 10:09:42 am
-
I have idle animation and walking animation. Idle animation wrap mode is set to single and walking animation set to loop.
When the player stops moving I want to continue the walking animation till the end then go to idle animation.
How to do this from code?
-
try something like this
if (!anim.IsPlaying("ANIMATION NAME"))
{
anim.Play("ANIMATION NAME");
}
-
since my walking animation is looping animation will it stop playing?
-
Yeah, It works like the .fbx animation, as long as the play animation condition is in active(for example: if you press right on your keyboard), it will play.