示例#1
0
文件: Program.cs 项目: zaq1xsw/DogSE
        static void Main(string[] args)
        {
            Logs.ConfigLogFile("TradeAge.log");
            Logs.AddAppender(new ConsoleAppender());

            controller = new GameController();
            controller.Net.NetStateConnect += Net_NetStateConnect;
            controller.Net.ConnectServer("127.0.0.1", 4530);
            pink.Add(new SimulatorMove(controller));

            GameServerService.StartTaskThread();

            while (true)
            {
                if (Console.KeyAvailable)
                {
                    var key = Console.ReadKey(false);
                    if (key.Key == ConsoleKey.Escape)
                    {
                        break;
                    }
                }

                Thread.Sleep(100);
                pink.ForEach(o => o.RandMove());
            }

            NetController.CloseThread();
        }
示例#2
0
        private static void Main(string[] args)
        {
            Logs.AddConsoleAppender();

            GameServerService.StartTaskThread();

            //test1();
            //test2();
            TestMove();

            while (true)
            {
                if (Console.ReadKey(false).Key == ConsoleKey.Escape)
                {
                    break;
                }
                Thread.Sleep(100);
            }

            GameServerService.RunType = ServerStateType.Closing;
        }