Функция () {
условие () {
действие;
}
}
Code
var udar1 : AnimationClip;
var udar2 : AnimationClip;
Update () {
if (Input.GetButton ("Atack1")) {
animation.clip = udar1;
animation.Play();
}
if (Input.GetButton ("Atack2")) {
animation.clip = udar2;
animation.Play();
}
}
В общих чертах так, попроще, но если покрасивей конечно придеться усложнять.