Ejemplo n.º 1
0
    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();
    }