Пример #1
0
        /// <summary>
        /// Draws the gameplay screen.
        /// </summary>
        public override void Draw(GameTime gameTime)
        {
            ScreenManager.GraphicsDevice.Clear(Color.Black);

            //Draw what's not taken care of by the sprite manager.
            spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Texture, SaveStateMode.None);

            playerManager.Draw(ref spriteBatch, gameTime);

            enemySpriteManager.Draw(ref spriteBatch, gameTime);

            // Draw the charge bar
            chargeBar.Draw(ref spriteBatch, gameTime);

            // Draw the repair power up
            //repairPowerup.Draw(ref spriteBatch, gameTime);

            // Draw the powerup manager
            powerupManager.Draw(ref spriteBatch, gameTime);

            //Draw particle system information
            //Defines.particleManager.Draw(ref spriteBatch, gameTime);

            //Print some stats from the enemy manager
            enemySpriteManager.ShowStats(ref spriteBatch);

            spriteBatch.End();
            DrawHud(gameTime);

            // If the game is transitioning on or off, fade it out to black.
            if (TransitionPosition > 0)
            {
                ScreenManager.FadeBackBufferToBlack(255 - TransitionAlpha);
            }
        }
Пример #2
0
        protected override void Draw(GameTime gameTime)
        {
            graphics.GraphicsDevice.Clear(Color.Black);

            //Draw what's not taken care of by the sprite manager.
            spriteBatch.Begin(SpriteBlendMode.AlphaBlend);

            //playerSpriteManager.Draw(ref spriteBatch, gameTime);
            //player1.Draw(ref spriteBatch, gameTime);
            playerManager.Draw(ref spriteBatch, gameTime);

            enemySpriteManager.Draw(ref spriteBatch, gameTime);

            // Draw the charge bar
            chargeBar.Draw(ref spriteBatch, gameTime);

            // Draw the repair power up
            repairPowerup.Draw(ref spriteBatch, gameTime);

            //Draw particle system information
            particleManager.Draw(ref spriteBatch, gameTime);

            //Draw game time
            spriteBatch.DrawString(spriteFont, "Time", new Vector2(Defines.clientBounds.Width / 2 - 10, 0), textColor);
            spriteBatch.DrawString(spriteFont, gameTime.TotalGameTime.Minutes + ":" + gameTime.TotalGameTime.Seconds.ToString("00"), new Vector2(Defines.clientBounds.Width / 2, 20), textColor);


            //Print some stats from the enemy manager
            enemySpriteManager.ShowStats(ref spriteBatch);

            //Draw the global gestures and fusio mode flags for each player
            for (int i = 0; i < Defines.playersGestures.Count; i++)
            {
                spriteBatch.DrawString(spriteFont, "Player " + i + " Gesture: " + Defines.playersGestures[(PlayerIndex)i].ToString(),
                                       new Vector2(Defines.clientBounds.Right - 400, (i + 1) * 20), textColor);

                spriteBatch.DrawString(spriteFont, "Player " + i + " Fusion Mode: " + Defines.playerFusionTriggered[(PlayerIndex)i].ToString(),
                                       new Vector2(Defines.clientBounds.Right - 400, (i + 1) * 40), textColor);
            }
            spriteBatch.End();

            base.Draw(gameTime);
        }
Пример #3
0
        public override void Draw(GameTime gameTime)
        {
            ScreenManager.GraphicsDevice.Clear(Color.Black);

            //Draw what's not taken care of by the sprite manager.
            spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Texture, SaveStateMode.None);

            //playerSpriteManager.Draw(ref spriteBatch, gameTime);
            //player1.Draw(ref spriteBatch, gameTime);
            playerManager.Draw(ref spriteBatch, gameTime);

            spriteBatch.End();

            DrawHud(gameTime);

            // If the game is transitioning on or off, fade it out to black.
            if (TransitionPosition > 0)
            {
                ScreenManager.FadeBackBufferToBlack(255 - TransitionAlpha);
            }

            base.Draw(gameTime);
        }