Hello,
i have done some tutorials to creat my first game.
To finish the project i have to add a menu that pops out when the player dies.
Is it possible to play the "menu pop out"animation on collision if the animation is a “animator” animation?
I got this code:
void OnCollisionEnter2D(Collision2D collision) {
if (godMode)
return;
animator.SetTrigger("Death");
//use other code to start animation. setTrigger will stop "death"animation
//animator.SetTrigger("DeathMenuOpen");
dead = true;
}
}
I tried to use the animator but if i use the “set.trigger()” code, the death animation will end.