I am trying to make an attack animation play when I press the fir button but it just plays all the time
Here is the script:
using UnityEngine;
using System.Collections;
public class Attack : MonoBehaviour {
** public bool strike;**
** void Update () {**
** if (Input.GetKeyDown (“C”)) {**
** strike = true;**
** }**
** if(strike==true){**
** animation.Play(“HammerStrike”);**
** }**
** }**
}
Any help would be appreciated