Esempio n. 1
0
    void FixedUpdate()
    {
        jump.SetContinousJump(controller.Jump(), controller.EndJump());
        timeControll.SlowReverse(controller.SlowReverse());
        timeControll.FlashReverse(controller.FlashReverse());

        if (stateMachine.Grounded())
        {
            attack.GroundedAttack(controller.Attack(), lockedShooting, controller.MoveHorizontal(), controller.MoveVertical());
            dash.ResetDash();
            jump.Grounded(controller.Jump(), controller.Sprint());
            move.Grounded(controller.MoveHorizontal(), controller.Sprint());
        }
        else if (stateMachine.Airborne())
        {
            if (stateMachine.WallLeft())
            {
                attack.WallAttackLeft(controller.Attack(), lockedShooting);
                dash.ResetDash();
                jump.LeftWall(controller.Jump());
                move.Wallride(controller.MoveHorizontal(), controller.Sprint());
            }
            else if (stateMachine.WallRight())
            {
                attack.WallAttackRight(controller.Attack(), lockedShooting);
                dash.ResetDash();
                jump.RightWall(controller.Jump());
                move.Wallride(controller.MoveHorizontal(), controller.Sprint());
            }
            else
            {
                attack.AirborneAttack(controller.Attack(), lockedShooting, controller.MoveHorizontal(), controller.MoveVertical());
                dash.Dash(controller.MoveHorizontal(), controller.MoveVertical(), controller.Dash());
                jump.Airborne(controller.Jump());
                move.Airborne(controller.MoveHorizontal(), controller.Sprint());
            }
        }
    }
Esempio n. 2
0
 void FixedUpdate()
 {
     jump.SetContinousJump(controller.Jump(), controller.EndJump());
     if (stateMachine.Grounded())
     {
         jump.Grounded(controller.Jump(), controller.Sprint());
     }
     else if (stateMachine.Airborne())
     {
         if (stateMachine.WallLeft())
         {
             jump.LeftWall(controller.Jump());
         }
         else if (stateMachine.WallRight())
         {
             jump.RightWall(controller.Jump());
         }
         else
         {
             jump.Airborne(controller.Jump());
         }
     }
 }