Esempio n. 1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            // Draw Tiles
            for (int i = 0; i < Tiles.Count; i++)
            {
                for (int j = 0; j < Tiles[i].Count; j++)
                {
                    Tiles[i][j].Draw(spriteBatch);
                }
            }

            // Selected
            if (Selected != null)
            {
                spriteBatch.Draw(TextureManager.selected, Selected.Position, null, Color.White, 0f, new Vector2(TextureManager.selected.Width / 2, TextureManager.selected.Height / 2), 1f, SpriteEffects.None, 0f);
            }

            // Game objects
            foreach (GameObject go in GameObjects)
            {
                go.Draw(spriteBatch);
            }

            // Infobuttons
            ModuleInfo.Draw(spriteBatch);
            TileboardInfo.Draw(spriteBatch);
            EnergyInfo.Draw(spriteBatch);

            if (!Started)
            {
                Text.TextDifferentColor(spriteBatch, "|W|Press enter to start", new Vector2(Globals.ScreenSize.X / 2, 10), 1.3f, TextureManager.SpriteFont20, true);
                if (EnemyDifficulty == Difficulty.Boss)
                {
                    spriteBatch.DrawString(TextureManager.SpriteFont20, "Warning! The boss has special modules,\nHover over them to read.\nAnd remember,\nyou can not flee from the boss.", new Vector2(10, Globals.CombatScreenSize.Y / 2 - 10), Color.White);
                }
            }

            if (EnemyDifficulty != Difficulty.Boss)
            {
                Flee.Draw(spriteBatch);
            }
        }