public override void Shutdown() { escapeMenu.Dispose(); _gameChat.TextSubmitted -= console.ParseChatMessage; console.AddString -= _gameChat.AddLine; playerManager.LocalPlayer.DetachEntity(); _entityManager.Shutdown(); mapManager.Shutdown(); userInterfaceManager.StateRoot.DisposeAllChildren(); var maps = mapManager.GetAllMaps().ToArray(); foreach (var map in maps) { if (map.Index != MapId.Nullspace) { mapManager.DeleteMap(map.Index); } } inputManager.SetInputCommand(EngineKeyFunctions.EscapeMenu, null); inputManager.SetInputCommand(EngineKeyFunctions.FocusChat, null); inputManager.KeyBindStateChanged -= OnKeyBindStateChanged; }
private void GameStoppedReset() { IoCManager.Resolve <INetConfigurationManager>().FlushMessages(); _gameStates.Reset(); _playMan.Shutdown(); _entityManager.Shutdown(); _mapManager.Shutdown(); _discord.ClearPresence(); Reset(); }
private void OnNetDisconnect(object sender, NetChannelArgs args) { DebugTools.Assert(RunLevel > ClientRunLevel.Initialize); PlayerLeaveServer?.Invoke(this, new PlayerEventArgs(_playMan.LocalPlayer.Session)); _stateManager.RequestStateChange <MainScreen>(); _playMan.Shutdown(); _entityManager.Shutdown(); _mapManager.Shutdown(); Reset(); }
private void OnNetDisconnect(object?sender, NetDisconnectedArgs args) { DebugTools.Assert(RunLevel > ClientRunLevel.Initialize); PlayerLeaveServer?.Invoke(this, new PlayerEventArgs(_playMan.LocalPlayer?.Session)); LastDisconnectReason = args.Reason; _gameStates.Reset(); _playMan.Shutdown(); _entityManager.Shutdown(); _mapManager.Shutdown(); _discord.ClearPresence(); Reset(); }
public override void Shutdown() { escapeMenu.Dispose(); _gameChat.TextSubmitted -= console.ParseChatMessage; console.AddString -= _gameChat.AddLine; playerManager.LocalPlayer.DetachEntity(); _entityManager.Shutdown(); userInterfaceManager.StateRoot.DisposeAllChildren(); var maps = mapManager.GetAllMaps().ToArray(); foreach (var map in maps) { if (map.Index != MapId.Nullspace) { mapManager.DeleteMap(map.Index); } } }
private void Cleanup() { _entityManager.Shutdown(); _clyde.Shutdown(); }