public static void StopGame() { //X.Instance.Try(ChatLog.ClearEvents); Program.GameMess.Clear(); X.Instance.Try(()=>Program.Client.Rpc.Leave(Player.LocalPlayer)); if (Client != null) { Client.ForceDisconnect(); Client = null; } if (GameEngine != null) GameEngine.End(); GameEngine = null; Dispatcher = null; IsGameRunning = false; }
public static void StopGame() { try { Program.Client.Rpc.Leave(Player.LocalPlayer); } catch { } if (Client != null) { Client.ForceDisconnect(); Client = null; } if(GameEngine != null) GameEngine.End(); GameEngine = null; Dispatcher = null; IsGameRunning = false; }