I know you can do animation.isPlaying() but is there something similiar for Animator ? So if I have:
Animator animator;
void Start()
{
animator = GetComponenet<Animator>();
}
Then I could go:
void Update()
{
if(Input.GetMouseButtonDown(0))
Instantiate(shot, shotSpawn.position, shotSpawn.rotation);
if(!animator.isPlaying("ShootAnimation"))
{
animator.SetTrigger("ShootAnimation"); // play shooting animation
}
}
}