Beispiel #1
0
        public GamePlay()
        {
            Cursor = MouseCursor.Pointer;

            Color[] palette = Resources.Instance.LoadPIC("SP257").Palette;

            _canvas = new Picture(320, 200, palette);
            _canvas.FillRectangle(5, 0, 0, 320, 200);

            _rightSideBar = Settings.RightSideBar;

            _menuBar = new MenuBar(palette);
            _sideBar = new SideBar(palette);
            _gameMap = new GameMap();

            _menuBar.GameSelected        += MenuBarGame;
            _menuBar.OrdersSelected      += MenuBarOrders;
            _menuBar.AdvisorsSelected    += MenuBarAdvisors;
            _menuBar.WorldSelected       += MenuBarWorld;
            _menuBar.CivilopediaSelected += MenuBarCivilopedia;

            while (Game.CurrentPlayer != Game.HumanPlayer)
            {
                Game.Instance.Update();
                GameTask.Update();
            }
        }
Beispiel #2
0
        public GamePlay()
        {
            OnResize += Resize;

            Palette = Resources["SP257"].Palette;

            _rightSideBar = Settings.RightSideBar;

            _menuBar = new MenuBar(Palette);
            _sideBar = new SideBar(Palette);
            _gameMap = new GameMap();

            CenterMapOnActiveHumanPlayerAsset();

            if (Width != 320 || Height != 200)
            {
                Resize(null, new ResizeEventArgs(Width, Height));
            }
            else
            {
                this.Clear(5);
            }

            _menuBar.GameSelected        += MenuBarGame;
            _menuBar.OrdersSelected      += MenuBarOrders;
            _menuBar.AdvisorsSelected    += MenuBarAdvisors;
            _menuBar.WorldSelected       += MenuBarWorld;
            _menuBar.CivilopediaSelected += MenuBarCivilopedia;

            while (Game.CurrentPlayer != Game.HumanPlayer)
            {
                Game.Instance.Update();
                while (GameTask.Update())
                {
                    ;
                }
            }

            if (!Common.AllowSaveGame)
            {
                GameTask.Insert(Message.General("The save game format", "is not compatible with the", "selected map size.", "The game can not be saved!"));
                Game.Settings.AutoSave = false;
            }
        }
Beispiel #3
0
        public GamePlay()
        {
            OnResize += Resize;

            Palette = Resources["SP257"].Palette;

            _rightSideBar = Settings.RightSideBar;

            _menuBar = new MenuBar(Palette);
            _sideBar = new SideBar(Palette);
            _gameMap = new GameMap();

            CenterMapOnActiveHumanPlayerAsset();

            if (Width != 320 || Height != 200)
            {
                Resize(null, new ResizeEventArgs(Width, Height));
            }
            else
            {
                this.Clear(5);
            }

            _menuBar.GameSelected        += MenuBarGame;
            _menuBar.OrdersSelected      += MenuBarOrders;
            _menuBar.AdvisorsSelected    += MenuBarAdvisors;
            _menuBar.WorldSelected       += MenuBarWorld;
            _menuBar.CivilopediaSelected += MenuBarCivilopedia;

            while (Game.CurrentPlayer != Game.HumanPlayer)
            {
                Game.Instance.Update();
                while (GameTask.Update())
                {
                    ;
                }
            }
        }