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…