Ejemplo n.º 1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);
            spriteBatch.Begin();
            _managerTiles.Draw(spriteBatch);
            _managerUnits.Draw(spriteBatch);
            _managerMouse.Draw(spriteBatch);
            spriteBatch.End();
            // TODO: Add your drawing code here

            base.Draw(gameTime);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(new Color(196, 207, 161));
            spriteBatch.Begin();
            _map.Draw(spriteBatch);
            _mouse.Draw(spriteBatch);
            spriteBatch.End();

            // TODO: Add your drawing code here

            base.Draw(gameTime);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
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();
        }