Ok now for anyone ready to help me here –
This is a 2d game and javascript MY Animation will not stop playing , I have so far
1 checked all loops OFF
2 checked for wrap modes set all to “once”
3 Checked and made sure it is not my default animation
Please help
heres my script below
var animator : Animator;
var pow: AudioClip;
var fingersslap: AnimationClip;
function Start () {
animator = GetComponent("Animator");
animation.clip = fingersslap;
audio.clip = pow;
}
//function Update () {
//if(Input.GetButtonDown("Fire1")) {
function OnCollisionEnter2D(coll : Collision2D) {
if (coll.gameObject.tag == "Player") {
//animator.SetBool("dead", true);
Debug.Log("whyyy collision detected");
//animation.Play("hit");
animator.SetBool("Fire1", true);
//audio.Play("Boom");
audio.PlayOneShot(pow);
//animation.Play("fingersslap");
//animation.Play("ded");
//animation.Play("hit");
//hit.gameObject.animation.Play();
}
else {
animator.SetBool("Fire1", false);
}
}
function SetFire1(value: boolean) {
Fire1 = value;
animator.SetBool("Fire1", value);
}