Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 private void GameStoppedReset()
 {
     IoCManager.Resolve <INetConfigurationManager>().FlushMessages();
     _gameStates.Reset();
     _playMan.Shutdown();
     _entityManager.Shutdown();
     _mapManager.Shutdown();
     _discord.ClearPresence();
     Reset();
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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);
                }
            }
        }
Exemplo n.º 6
0
 private void Cleanup()
 {
     _entityManager.Shutdown();
     _clyde.Shutdown();
 }