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

            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, camera.transform);
            managerMap.Draw(spriteBatch);

            managerEnemies.Draw(spriteBatch);
            managerUnits.Draw(spriteBatch);
            managerBuildings.Draw(spriteBatch);
            managerMouse.Draw(spriteBatch);
            spriteBatch.End();

            spriteBatch.Begin();
            managerUI.DrawBack(spriteBatch);
            managerUI.Draw(spriteBatch);
            managerUnits.DrawUI(spriteBatch);
            managerEnemies.DrawUI(spriteBatch);
            managerBuildings.DrawUI(spriteBatch);
            spriteBatch.End();

            base.Draw(gameTime);
        }
Esempio n. 2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Warcraft.camera.transform);
            managerIsland.Draw(spriteBatch);
            //managerEA.Draw(spriteBatch);
            managerPlayerUnits.Draw(spriteBatch);
            managerPlayerBuildings.Draw(spriteBatch);
            managerEnemies.Draw(spriteBatch);
            managerMouse.Draw(spriteBatch);
            spriteBatch.End();

            spriteBatch.Begin();
            managerUI.DrawBack(spriteBatch);
            managerUI.Draw(spriteBatch);
            managerPlayerUnits.DrawUI(spriteBatch);
            managerPlayerBuildings.DrawUI(spriteBatch);
            managerEnemies.DrawUI(spriteBatch);


            if (Battleship.move || !start)
            {
                spriteBatch.Draw(cursor, new Rectangle(0, 0, Warcraft.WINDOWS_WIDTH, Warcraft.WINDOWS_HEIGHT), new Color(0, 0, 0, fadeOut));

                if (!start)
                {
                    spriteBatch.Draw(cursor, new Rectangle(0, 0, Warcraft.WINDOWS_WIDTH, Warcraft.WINDOWS_HEIGHT), Color.Black);
                    summary.DrawStart(spriteBatch);
                }

                if (showSummary)
                {
                    summary.Draw(spriteBatch, managerPlayerUnits, managerEnemies.managerUnits);
                }
            }

            spriteBatch.End();
        }