Hello guys,
I have problem when playing animatons when I press a joystick button, only the two first animations work, but the 2 last are not working
if(Input.GetButtonDown("Fire1")){
// Instantiate(AttackEffect, transform.position, transform.rotation);
//animation.Play("gogo_fire");
// audio.PlayOneShot(AttackSound);
_animation.CrossFade(Sword_Anim.name);
walkSpeed = 1.0;
trotSpeed = 1.0;
}
if(Input.GetButtonUp("Fire1")){
walkSpeed = 14.0;
trotSpeed = 16.0;
}
if(Input.GetButtonDown("Fire2")){
// Instantiate(AttackEffect, transform.position, transform.rotation);
//animation.Play("gogo_fire");
// audio.PlayOneShot(AttackSound);
_animation.CrossFade(Sword_Anim2.name);
}
if(Input.GetButtonDown("Fire3")){
// Instantiate(AttackEffect, transform.position, transform.rotation);
//animation.Play("gogo_fire");
// audio.PlayOneShot(AttackSound);
_animation.CrossFade(Sword_Anim3.name);
//animation.Blend("gogo_sword2");
}
if(Input.GetButtonDown("FireJoy")){
// Instantiate(AttackEffect, transform.position, transform.rotation);
//animation.Play("gogo_fire");
// audio.PlayOneShot(AttackSound);
_animation.CrossFade(Sword_Anim4.name);
}
Please help :'(
↧