Пример #1
0
        public override void OnFixedUpdate(MainPlayerMovementFSM playerFSM)
        {
            if (playerFSM.AirControl)
            {
                playerFSM.MoveFixed();
            }

            if (timerTime >= timeBeforeJumpCheck)
            {
                isJumping = true;
            }

            if (isJumping)
            {
                Collider[] colliders = Physics.OverlapSphere(playerFSM.GroundCheckPoint.position, playerFSM.GroundCheckRadius, playerFSM.GroundMask);
                if (colliders.Length > 0)
                {
                    isJumping = false;
                    playerFSM.EnterState(playerFSM.idleState, true);
                }
            }
        }
Пример #2
0
 public override void OnFixedUpdate(MainPlayerMovementFSM playerFSM)
 {
     playerFSM.MoveFixed();
 }