Beispiel #1
0
        public override SpriteBatch Draw(GameTime gametime, SpriteBatch spriteBatch)
        {
            Game1.graphics.GraphicsDevice.Clear(Color.AliceBlue);

            spriteBatch.Draw(backGroundTexture, Vector2.Zero, backGroundTexture.Bounds, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0);
            //spriteBatch.Draw(arrowTexture, ResolutionUtility.mousePos - new Vector2(arrowTexture.Bounds.Height / 2, arrowTexture.Bounds.Width) * 1, arrowTexture.Bounds, sceneColor, 0, Vector2.Zero, 1, SpriteEffects.None, 0);
            //  spriteBatch.DrawString(popUpFont, Game1.graphics.PreferredBackBufferWidth + " x " + Game1.graphics.PreferredBackBufferHeight, new Vector2(500, 100) * 1, Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
            //  spriteBatch.DrawString(popUpFont, "Complex sprites on screen: " + shapes.Count, new Vector2(300, 200) * 1, Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
            // spriteBatch.DrawString(popUpFont, "Press Space to quit.\nArrow keys to move camera.\nPress I to add up to 4 heroes.\nLMB to select a hero.\nEsc or bs to deselect selection. \nFriendly fire is: " + bFriendlyFire, new Vector2(300, 200) * 1, Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 1);

            DrawMapBorder(spriteBatch);

            if (bPaused)
            {
                spriteBatch.DrawString(pauseFont, "PAUSED", new Vector2(430, 20) - SceneUtility.Axis, Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 1);
            }

            foreach (var character in activeObjects)
            {
                character.Draw(spriteBatch);
            }


            foreach (var shape in shapes)
            {
                shape.Draw(spriteBatch);
            }

            if (SceneUtility.currentScene == (int)Game1.Screens.BGame)
            {
                MainGUI.Draw(spriteBatch);
            }


            if (bShowPopUp)
            {
                pauseScreen.Draw(spriteBatch);
                spriteBatch.Draw(selectionIndicatorTexture, pauseScreen.popUpButtons[currentPauseChoice].ButtonBox(), Color.White);
            }

            return(spriteBatch);
        }