Esempio n. 1
0
        public void Run()
        {
            Console.Clear();
            Console.CursorVisible = false;
            Console.SetWindowSize(P_Const.CONSOLE_WIDTH, P_Const.CONSOLE_HEIGHT);
            Console.SetBufferSize(P_Const.CONSOLE_WIDTH, P_Const.CONSOLE_HEIGHT);
            P_Render        Renderer = new P_Render();
            P_InputMap      Inputer  = new P_InputMap();
            P_UpdateManager Updater  = new P_UpdateManager(Inputer);
            P_MainMenu      MainMenu = new P_MainMenu(Renderer, Updater);

            PrototypeTextBox.P_DisplayBox background = new PrototypeTextBox.P_DisplayBox(Updater, Renderer);
            background.DismissUpdater(Updater);
            background.Render.Visable = true;
            background.Render.Graphic = new char[P_Const.CONSOLE_WIDTH * P_Const.CONSOLE_HEIGHT];
            for (int i = 0; i < background.Render.Graphic.Length; i++)
            {
                background.Render.Graphic[i] = ' ';
            }
            background.Render.RenderLayer = RenderLayerEnum.Background;

            MainMenu.Start();

            while (Updater.CallUpdate())
            {
                Renderer.RenderScreen();
                Inputer.ProtoInput();
            }
            //Renderer.RenderScreen();
            //Console.ReadKey(true);
            //TODO: ProtoBattle.Run(ProtoMap, ProtoActors);
        }
Esempio n. 2
0
 public void AcceptInputs(P_InputMap input)
 {
     input.InputChanged += NewInput;
 }
Esempio n. 3
0
 public P_UpdateManager(P_InputMap inputer)
 {
     UpdateList = new List <IP_Update>();
     this.AcceptInputs(inputer);
 }