Ejemplo n.º 1
0
        protected override void Initialize()
        {
            //set up the viewport to match screen resolution and set to full screen
            graphics.PreferredBackBufferWidth  = screenResolutionWidth;
            graphics.PreferredBackBufferHeight = screenResolutionHeight;
            //graphics.IsFullScreen = true;
            graphics.ApplyChanges();

            this.IsMouseVisible = true;

            gameArt = new GameArt(this.Content);
            InitializeGameArea();
            InitilaizeMapArea();
            InitializeUIArea();

            aColor       = Color.White;
            anotherColor = Color.White;

            gameResources = new Resources();

            uiText    = new TextDisplay(this.Content, "test", new Vector2(85 + (40 * 4), 300 + (40 * 6)));
            debugText = new TextDisplay(this.Content, "test", new Vector2(0, 0));
            armyText  = new TextDisplay(this.Content, "0", new Vector2(85 + (40 * 6), 300 + (40 * 9)));
            //set time to zero
            elapsedTime = 0;

            minWaitTime = 30000;



            gameArea[0, 0].AddBuilding();
            gameArea[2, 2].AddBuilding();
            gameArea[0, 0].People = 10;

            base.Initialize();
        }
Ejemplo n.º 2
0
        protected override void Initialize()
        {
            //set up the viewport to match screen resolution and set to full screen
            graphics.PreferredBackBufferWidth = screenResolutionWidth;
            graphics.PreferredBackBufferHeight = screenResolutionHeight;
            //graphics.IsFullScreen = true;
            graphics.ApplyChanges();

            this.IsMouseVisible = true;

            gameArt = new GameArt(this.Content);
            InitializeGameArea();
            InitilaizeMapArea();
            InitializeUIArea();

            aColor = Color.White;
            anotherColor = Color.White;

            gameResources = new Resources();

            uiText = new TextDisplay(this.Content, "test", new Vector2(85 + (40 * 4), 300 + (40 * 6)));
            debugText = new TextDisplay(this.Content, "test", new Vector2(0, 0));
            armyText = new TextDisplay(this.Content, "0", new Vector2(85 + (40 * 6), 300 + (40 * 9)));
            //set time to zero
            elapsedTime = 0;

            minWaitTime = 30000;

            gameArea[0, 0].AddBuilding();
            gameArea[2, 2].AddBuilding();
            gameArea[0, 0].People = 10;

            base.Initialize();
        }