I have created two animations called Idle and SpinAttack. One is just a simple Idle animation and the other is a spin attack and i want them to play depending on the state my enemy is in.
I got everything working so far but when i set it so my SpinAttack animations with this code:
case BossStates.Idle:
if (Input.GetKey(KeyCode.G)) {
bossState = BossStates.SpinAttack;
}
break;
case BossStates.SpinAttack:
timer = timer - Time.deltaTime * delayTime;
anim.Play("SpinAttack",-1, 0f);
break;
The SpinAttack animation instead of playing like i expected just reset the rotation of my enemy like it should do as it’s about to play but it doesn’t play and i don’t know why… It just doesn’t play but when i make the animation the default animation then it works perfectly but it’s always playing
This is my Animator:
Any help?