Can I delay the exit of an animation?
So I have a 2d game and Im making the animations. I made a shooting animations that triggers whenever the mouse button is pressed. although it works, its so quick that you cant see the animation playing. Is there any way I can delay the exit time of the animation in order to show my player that he is shooting?
public Transform firePoint;
public GameObject Bulletpref;
public Animator anim;
// Update is called once per frame
void Update()
{
if (Input.GetButtonDown("Fire1"))
{
Shoot();
anim.SetBool("isShooting", true);
}
else
{
anim.SetBool("isShooting", false);
}
}
void Shoot()
{
Instantiate(Bulletpref, firePoint.position, firePoint.rotation);
}
}
Comment