Exemplo n.º 1
0
        internal void Run()
        {
            Console.WriteLine("用摸的RPG");
            Console.WriteLine("系統啟動...");
            Regulus.Utility.Singleton<Regulus.Utility.ConsoleLogger>.Instance.Launch("SamebestKeys");

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

            bool userRunning = true;
            var user = _CreateUser(frameworkRoot);
            user.Quit += () =>
            {
                userRunning = false;
            };
            _CreateRandomBot(frameworkRoot);

            _CreateStageBot(frameworkRoot);

            while (userRunning)
            {
                frameworkRoot.Update();
            }
            frameworkRoot.Shutdown();
            Console.WriteLine("系統關閉...");
            Regulus.Utility.Singleton<Regulus.Utility.ConsoleLogger>.Instance.Shutdown();
            Console.WriteLine("關閉完成.");
        }
Exemplo n.º 2
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;
                });
            _Initial(server);

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

            server.Command.Unregister("quit");
            updater.Shutdown();
        }
Exemplo n.º 3
0
 void IDisposable.Dispose()
 {
     _ThreadUpdater.Stop();
     _Updater.Shutdown();
     lock (_Users)
     {
         _Users.Clear();
     }
 }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
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();
        }
Exemplo n.º 6
0
 protected override void _Shutdown()
 {
     _Updater.Shutdown();
 }