function Start(){ animation.Play("idle"); } function Update(){ var cubeMane=GameObject.FindWithTag("pla"); if(Input.GetKey(KeyCode.W)){ animation.Play("walk"); } //////////////////////////////////////////*******//////// if(Input.GetKey(KeyCode.S)){ animation.Play("walk"); } //////////////////////////////////////////*******//////// if(Input.GetKey(KeyCode.D)){ animation.Play("walk"); } //////////////////////////////////////////*******//////// if(Input.GetKey(KeyCode.A)){ animation.Play("walk"); } //////////////////////////////////////////*******//////// if(Input.GetKey(KeyCode.E)){ animation.Play("jump"); } else{ animation.Play("idle"); } }