Example #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();
            DrawBackground();
            DrawGameArea();
            DrawMapArea();
            DrawUIArea();
            DrawBuilding();
            DrawArmyUnits();

            spriteBatch.End();

            SpriteBatch fontBatch = new SpriteBatch(GraphicsDevice);

            uiText.DrawFont(fontBatch);
            debugText.DrawFont(fontBatch);
            if (UI.isMilitary())
            {
                armyText.stringPositionValue = new Vector2(85 + (40 * 6), 300 + (40 * 9));
                armyText.DrawFont(fontBatch);
            }
            if (UI.isMain())
            {
                armyText.stringPositionValue = new Vector2(UI.UIAreaStartingPosition.X + (6 * gameArt.TileTexture.Width) + 10, UI.UIAreaStartingPosition.Y + (6 * gameArt.TileTexture.Height));
                armyText.DrawFont(fontBatch);
            }

            base.Draw(gameTime);
        }