Exemplo n.º 1
0
        private static void DrawGameScreen(SpriteBatch spriteBatch)
        {
            // Game

            spriteBatch.Begin(Game1.camera, samplerState: SamplerState.PointClamp);

            player.Draw(spriteBatch);

            DrawPlatforms(spriteBatch);

            DropManager.Draw(spriteBatch);

            WaveManager.Draw(spriteBatch);

            Effects.Draw(spriteBatch);

            spriteBatch.End();

            // Player HUD

            spriteBatch.Begin();

            player.DrawUI(spriteBatch);

            if (!isPaused)
            {
                pauseButton.Draw(spriteBatch);

                if (player.isDead)
                {
                    replayButton.Draw(spriteBatch);

                    Helper.DrawString(spriteBatch, consolasFontBig, "Enmies Killed: " + player.EnemiesKilled.ToString(), Color.White, new Rectangle(width / 2 - 100, height / 2, 200, 50));
                    Helper.DrawString(spriteBatch, consolasFontBig, "Ships Destoryed: " + player.ShipsDestroyed.ToString(), Color.White, new Rectangle(width / 2 - 100, height / 2 + 75, 200, 50));
                }
            }
            else if (isPaused)
            {
                spriteBatch.Draw(assets["square"], new Rectangle(0, 0, width, height), Color.Black * 0.3f);
                menuButton.Draw(spriteBatch);
                resumeButton.Draw(spriteBatch);
            }

            Helper.DrawString(spriteBatch, consolasFontBig, "Wave: " + (WaveManager.WaveNumber + 1).ToString(), Color.White, new Rectangle(width / 2 - 50, 10, 100, 40));

            spriteBatch.End();
        }