split animation
http://gp-portal.jp/material/refMaterial/2255_Unity_document01.pdf
function Awake () { animation.Play("run"); }
function Update () { if(Input.GetButtonDown ("Fire2")) //マウス右クリックあるいは ALT キー { SendMessage ("Didattack"); } } function Didattack () { animation.Play("attack01"); }
function Start () { animation[“idle”].layer = -2; animation["attack01"].layer = 1; }
攻撃モーション→待機モーションなども書いてあります
レイヤーが上のものを優先再生
function Didattack () { animation.CrossFadeQueued("attack01", 0.1, QueueMode.PlayNow); }
animationをなめらかにつなげる↑
再生待ち設定は 2 種類から選択して記述します。 ■QueueMode.CompleteOthers:現在再生中のアニメーションの終了を待って再生 ■QueueMode.PlayNow:即座に再生
連続攻撃についても書いてあります.