this NOOB (AKA me!) is having a problem with his animations.So i'm programming in javascript that if my animation is done that it needs to shoot. now the problem isn't the shooting part it is the if done part.
you see I get an error that says that I cannot Quote: invoke an expression of UnityEngine.Animation)UnQuote.
if that is not enough here is my script.(well part of it atleast)
if(Input.GetButtonDown("X"))
{
animation.CrossFade("Shoot");
}
if(animation("Shoot").isDone)
{
var bullet = (bulletPrefab, transform.Find("X").transform.position, Quaternion.identity);
bullet.rigidbody.AddForce(transform.forward * bulletSpeed );
}