function Update () { if (Input.GetButtonDown("Attack")) { GetComponent.().Play("AttackAnimation"); } }