Exemplo n.º 1
0
 public static void ValidateStateAfterUpdate(Contexts contexts, PlayerEntity player)
 {
     if (!player.playerSkyMove.IsMoveEnabled && player.playerSkyMove.IsParachuteAttached)
     {
         PlayerSkyMoveUtility.DetachParachute(contexts, player);
     }
 }
Exemplo n.º 2
0
        private void CommonSkyMoveLand(Contexts contexts, PlayerEntity player)
        {
            _logger.DebugFormat("SKyDive: Detach Parachute To Landing State");

            player.stateInterface.State.ParachutingEnd();
            PlayerSkyMoveUtility.DetachParachute(contexts, player);
        }
Exemplo n.º 3
0
        protected override bool ValidateState(Contexts contexts, PlayerEntity player)
        {
            player.gamePlay.GameState = player.playerSkyMove.GameState;

            if (player.playerSkyMove.IsParachuteAttached)
            {
                _logger.Warn("Sky Gliding State is not valid.");
                PlayerSkyMoveUtility.DetachParachute(contexts, player);
            }

            return(true);
        }
Exemplo n.º 4
0
        protected override bool ValidateState(Contexts contexts, PlayerEntity player)
        {
            if (player.playerSkyMove.GameState != -1)
            {
                player.gamePlay.GameState = player.playerSkyMove.GameState;
            }

            if (player.playerSkyMove.IsParachuteAttached)
            {
                _logger.Warn("Sky Start State is not valid.");
                PlayerSkyMoveUtility.DetachParachute(contexts, player);
//                player.playerSkyMove.MoveStage = (int) SkyMoveStage.Parachuting;
//                return false;
            }
            return(true);
        }