I want the animation not to play if it is already playing...

How can I prevent my animation from playing if it is already playing? This is my C# Script:

void ReloadGun () {
bullets = 0;

    if (!gunOn) {
		UnHolsterGun();
	}
	else if (!inTransition && !inFire) {
		animation.CrossFade(reloadAnimation.name);

		bullets = clipSize;
		
		SendMessage("OnReload");
	}
}

This is just the reload part…

You could try doing a check if it is playing beforehand

void ReloadGun () {
    bullets = 0;

    if (!gunOn) {
        UnHolsterGun();
    }
    else if (!inTransition && !inFire) {
        if(!animation.IsPlaying(reloadAnimation.name))  //If its not playing
            animation.CrossFade(reloadAnimation.name);

        bullets = clipSize;

        SendMessage("OnReload");
    }
}