public static void ValidateStateAfterUpdate(Contexts contexts, PlayerEntity player) { if (!player.playerSkyMove.IsMoveEnabled && player.playerSkyMove.IsParachuteAttached) { PlayerSkyMoveUtility.DetachParachute(contexts, player); } }
private void CommonSkyMoveLand(Contexts contexts, PlayerEntity player) { _logger.DebugFormat("SKyDive: Detach Parachute To Landing State"); player.stateInterface.State.ParachutingEnd(); PlayerSkyMoveUtility.DetachParachute(contexts, player); }
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); }
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); }