public override void Execute() { if (Input.GetAxisRaw("Horizontal") != 0 || Input.GetAxisRaw("Vertical") != 0) { controller.ChangeState(controller.walk); } if (Input.GetKeyDown(KeyCode.Space)) { controller.ChangeState(controller.dash); return; } Walk walk = controller.walk as Walk; walk.Move(); }