Play an animation on button press

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

Change the wrap mode to make it play once, or if you want to not permanently change it, you can follow the example in the best answer here:
http://answers.unity3d.com/questions/45070/play-animation-only-once.html?sort=oldest