Пример #1
0
		public static void Main(string[] args)
		{
			var view = new ConsoleViewer();
			var input = new ConsoleInput(view);

			var core = _LoadGame("Game.dll");

			var client = new Client<IUser>(view, input);

			client.ModeSelectorEvent += new ModeCreator(core , client.Command ).Select;
			
            

            var updater = new Updater();
			updater.Add(client);
			updater.Add(core);

			while(client.Enable)
			{
				input.Update();
				updater.Working();
			}

			updater.Shutdown();
		}
Пример #2
0
        private static void Main(string[] args)
        {
            var sw = new SpinWait();

            var botCount = 1;
            if(args.Length > 0)
            {
                botCount = int.Parse(args[0]);
            }

            if(args.Length > 1)
            {
                Program.IPAddress = args[1];
            }

            var clientHandler = new ClientHandler(Program.IPAddress, Program.Port, botCount);
            var view = new ConsoleViewer();
            Singleton<Log>.Instance.Initial(view);
            var input = new ConsoleInput(view);
            var client = new Client(view, input);
            var packetRegulator = new PacketRegulator();
            client.Command.Register(
                "si",
                () =>
                {
                    Console.WriteLine(
                        "Send Interval : {0}\nRequest Package Queue : {1}",
                        HitHandler.Interval,
                        packetRegulator.Sampling);
                });
            client.ModeSelectorEvent += clientHandler.Begin;

            var updater = new Updater();
            updater.Add(client);
            updater.Add(clientHandler);
            updater.Add(packetRegulator);

            while(client.Enable)
            {
                input.Update();
                updater.Working();
                sw.SpinOnce();
            }

            client.Command.Unregister("si");
            updater.Shutdown();
            clientHandler.End();
            Singleton<Log>.Instance.Final();
        }
Пример #3
0
		private static void Main(string[] args)
		{
			var enable = true;
			var view = new ConsoleViewer();
			var input = new ConsoleInput(view);

			var console = new Console(input, view);
			console.Command.Register("quit", () => enable = false);
			console.Command.Register("CoreFPS", Program._CoreFPS);

			while(enable)
			{
				input.Update();
			}
		}
Пример #4
0
        static void Main(string[] args)
        {
            var view = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(view);

            var console = new Regulus.Utility.Console(input, view);

            bool run = true;
            var wheel = new VGame.CLR.Wheel();
            console.Command.Register("Quit" , () => { run = false; });
            console.Command.Register("Spin", () => { _Spin(view , wheel); });

            console.Command.Register("Export", () => { _Export(view, wheel); });
            console.Command.Register<string>("Import[path]", (path) => { _Import(view, wheel , path); });

            while (run)
            {

                input.Update();
            }
        }
Пример #5
0
        private static void Main(string[] args)
        {
            var view = new ConsoleViewer();
            var input = new ConsoleInput(view);
            ICore core = null; // _LoadGame("Game.dll");

            var client = new Client(view, input);

            client.ModeSelectorEvent += new ModeCreator(core).OnSelect;

            var updater = new Updater();
            updater.Add(client);

            // updater.Add(core);
            while(client.Enable)
            {
                input.Update();
                updater.Working();
            }

            updater.Shutdown();
        }