This question was
closed Aug 08, 2016 at 03:15 PM by
redfalconn for the following reason:
The question is answered, right answer was accepted
Question by
redfalconn · Aug 08, 2016 at 02:41 PM ·
fps
Set booleans to true after animation ends.
Helo, how can I make so after an animation ends, all the booleans that are currently set to false become true? I already tried with private void animation ended(); and called it from animation event, but animations still override each other. I want the fire animation, and draw animation to be false while reloading, and then after the animation ends, to be true.
if (Input.GetKeyDown(KeyCode.R) && IsReloading)
{
anim.CrossFade(reloadAnim);
IsFiring = false;
IsDrawing = false;
}
else
{
AnimationEnded();
}
This is the method I'm calling from animation event:
public void AnimationEnded()
{
IsFiring = true;
IsReloading = true;
IsDrawing = true;
}
Thank you.
Comment