- Home /
Question by
JuanseCoello · Nov 10, 2013 at 01:01 AM ·
animationtimerstopstate
How to stop animation state after some time (1 seconds)
I have this script part
public void Fall()
{
if (IsDead || State == CharacterState.Running || State == CharacterState.RunningDouble) // HERE GOES THE CODE
return;
lastState = State;
State = CharacterState.Falling;
// If we are too high do something
animation.CrossFade("Falling");
}
I want to put: if the character is dead, or if the character is running for one second or if the character is runningdouble for 1 second. RETURN;
But if the character has runned for 1 second, or runneddouble for 1 second, continue with animation.CrossFade("Falling");
Comment
Your answer
Follow this Question
Related Questions
ANimation doesn't rewind on animation.Stop 3 Answers
Help playing the right animation 1 Answer
How to play the animation when time countdown is out 1 Answer
Mechanim state triggers twice 1 Answer
Reverse animation problem 1 Answer