Hey! I need some help.
I used to make an animation of walking and animation of catwalk. But walking is working and catwalking is not.
// Use this for initialization
void Start () {
body.GetComponent<Animation>().Play(idle.name);
}
// Update is called once per frame
void Update () {
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.D))
body.GetComponent<Animation>().Play(walk.name);
else
body.GetComponent<Animation>().Play(idle.name);
if (Input.GetKey(KeyCode.LeftControl))
{
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.D))
body.GetComponent<Animation>().Play(catwalk.name);
else
body.GetComponent<Animation>().Play(seat.name);
}
}
}