Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }