private void OnNetDisconnect(object?sender, NetDisconnectedArgs args) { DebugTools.Assert(RunLevel > ClientRunLevel.Initialize); PlayerLeaveServer?.Invoke(this, new PlayerEventArgs(_playMan.LocalPlayer?.Session)); LastDisconnectReason = args.Reason; GameStoppedReset(); }
private void OnNetDisconnect(object sender, NetChannelArgs args) { Debug.Assert(RunLevel > ClientRunLevel.Initialize); PlayerLeaveServer?.Invoke(this, new PlayerEventArgs(_playMan.LocalPlayer.Session)); _stateManager.RequestStateChange <MainScreen>(); _playMan.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(); }