function Start ()
{
animation.wrapMode = WrapMode.Loop;
animation["jump"].wrapMode = WrapMode.Once;
animation["jump"].layer = 1;
animation.Stop();
}
function Update ()
{
if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1)
animation.CrossFade("run");
else
animation.CrossFade("walk");
if (Input.GetKeyDown ("space"))
animation.CrossFade("jump");
}
//一个层容纳两个动作