예제 #1
0
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(viwer);

            TestNativeUser.Application appliaction = new TestNativeUser.Application(viwer, input);

            var app = new Appliaction(appliaction, viwer);

            Regulus.Utility.Updater updater = new Regulus.Utility.Updater();
            appliaction.SetLogMessage(Regulus.Utility.Console.LogFilter.All);
            updater.Add(app);
            updater.Add(appliaction);

            bool exit = false;

            appliaction.Command.Register("quit", () => { exit = true; });

            while (exit == false)
            {
                input.Update();
                updater.Update();
            }
            appliaction.Command.Unregister("quit");
        }
예제 #2
0
파일: Program.cs 프로젝트: kof1016/Regulus
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(viwer);
            var server = new Regulus.Remoting.Soul.Native.Application(viwer, input);

            Regulus.Utility.Updater<Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>();
            updater.Add(server);

            bool exit = false;

            server.Command.Register("quit",
                () =>
                {
                    exit = true;
                });
            _Initial(server);

            while (exit == false)
            {
                updater.Update();
                input.Update();
            }

            server.Command.Unregister("quit");
            updater.Shutdown();
        }
예제 #3
0
        static void Main(string[] args)
        {
            var view = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(view);

            var application = new Regulus.Project.SamebestKeys.Console(view, input);

            _BuildGameData(view);
            BotSet bots = new BotSet();

            application.SetLogMessage(Regulus.Utility.Console.LogFilter.All);

            Regulus.Utility.Updater updater = new Regulus.Utility.Updater();

            updater.Add(application);
            updater.Add(input);
            updater.Add(bots);

            bool exit = false;
            application.Command.Register("quit", () => { exit = true; });
            application.Command.Register<string,int>("SetBotIp",
                (ip,port) =>
                {
                    Bot.Port = port;
                    Bot.IpAddress = ip;
                });
            application.Command.Register<int>("BotSn", (sn) =>
            {
                bots.Sn = sn;
            });

            application.Command.Register<int>("Bot", (count) =>
            {
                bots.Create(count);
            });
            application.SelectSystemEvent += (selector) =>
            {
                var value = selector.Use("remoting");
                value.OnValue += _SpawnController;
                value.OnValue += (requester) =>
                {
                    bots.Requester = requester;
                };
            };

            Regulus.Utility.TimeCounter fps = new Regulus.Utility.TimeCounter(); ;
            while (exit == false)
            {
                updater.Update();
                fps.Reset();
            }
            application.Command.Unregister("SetBotIp");
            application.Command.Unregister("BotSn");
            application.Command.Unregister("Bot");
            application.Command.Unregister("quit");
            application.Stop();
        }
예제 #4
0
파일: Program.cs 프로젝트: kof1016/Regulus
        static void Main(string[] args)
        {
            var view = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(view);

            var application = new Regulus.Project.SamebestKeys.Console(view, input);

            BotSet bots = new BotSet();

            application.SetLogMessage(Regulus.Utility.Console.LogFilter.All);

            Regulus.Utility.Updater<Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>();

            updater.Add(application);
            updater.Add(input);
            updater.Add(bots);

            bool exit = false;
            application.Command.Register("quit", () => { exit = true; });
            application.Command.Register<int>("Bot", (count) =>
            {
                bots.Create(count);
            });
            application.SelectSystemEvent += (selector) =>
            {
                var value = selector.Use("remoting");
                value.OnValue += _SpawnController;
                value.OnValue += (requester) =>
                {
                    bots.Requester = requester;
                };
            };

            Regulus.Utility.TimeCounter fps = new Regulus.Utility.TimeCounter(); ;
            while (exit == false)
            {
                if (fps.Second > 1.0 / 60)
                {
                    updater.Update();
                    fps.Reset();
                }
            }
            application.Command.Unregister("Bot");
            application.Command.Unregister("quit");
            application.Stop();
        }
예제 #5
0
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input  = new Regulus.Utility.ConsoleInput(viwer);
            var server = new Regulus.Remoting.Soul.Native.Application(viwer, input);

            Regulus.Utility.Updater <Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater <Regulus.Utility.IUpdatable>();
            updater.Add(server);

            bool exit = false;

            server.Command.Register("quit", () => { exit = true; });

            while (exit == false)
            {
                updater.Update();
                input.Update();
            }

            server.Command.Unregister("quit");
        }
예제 #6
0
        static void Main(string[] args)
        {
            bool exit = false;
            Regulus.Utility.ConsoleViewer view = new Regulus.Utility.ConsoleViewer();
            Regulus.Utility.ConsoleInput input = new Regulus.Utility.ConsoleInput(view);

            Imdgame.RunLocusts.Client client = new Imdgame.RunLocusts.Client(view, input);

            Regulus.Utility.Updater updater = new Regulus.Utility.Updater();

            client.Command.Register("quit", () => { exit = true; });

            updater.Add(client);
            updater.Add(input);

            while (exit == false)
            {
                updater.Update();
            }

            updater.Shutdown();
        }
예제 #7
0
        static void Main(string[] args)
        {
            System.Reflection.Assembly.LoadFrom("GameCore.dll");
            var view = new Regulus.Utility.ConsoleViewer() as Regulus.Utility.Console.IViewer;
            var input = new Regulus.Utility.ConsoleInput(view);
            var application = new Terry.Project.User.ClientUserFramework(view, input);

            Regulus.Utility.Updater updater = new Regulus.Utility.Updater();
            updater.Add(application);
            updater.Add(input);

            bool exit = false;
            application.Command.Register("quit", () => { exit = true; });
            application.Command.Register("sp", () => { application.Command.Run("spawncontroller" , new string[]{"1"}); });
            application.Command.Register("sl", () => { application.Command.Run("selectcontroller", new string[] { "1" }); });

            while(exit == false)
            {
                updater.Update();
            }
            updater.Shutdown();
        }
예제 #8
0
        static void Main(string[] args)
        {
            Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer();
            var input = new Regulus.Utility.ConsoleInput(viwer);
            TestNativeUser.Application appliaction = new TestNativeUser.Application(viwer, input);

            var app = new Appliaction(appliaction, viwer);

            Regulus.Utility.Updater updater = new Regulus.Utility.Updater();
            appliaction.SetLogMessage(Regulus.Utility.Console.LogFilter.All);
            updater.Add(app);
            updater.Add(appliaction);

            bool exit = false;
            appliaction.Command.Register("quit", () => { exit = true; });

            while (exit == false)
            {
                input.Update();
                updater.Update();

            }
            appliaction.Command.Unregister("quit");
        }