示例#1
0
 protected override void OnExiting(object sender, EventArgs args)
 {
     inGame = false;
     NetworkHost.shutdown();
     NetworkClient.shutdown();
     base.OnExiting(sender, args);
 }
示例#2
0
        static void Main(string[] args)
        {
            Thread backThread = new Thread(new ThreadStart(delegate()
            {
                using (Main game = new Main())
                {
                    game.Run();
                }
            }));

            backThread.Start();
            backThread.Join();

            QuadTree.Main.inGame = false;
            NetworkHost.shutdown();
            NetworkClient.shutdown();
        }