Example #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            spriteBatch.Begin();

            // tell the game management systems to render all of the game's entities (if the game has been started)
            if (spaceShipSystem.numberOfSpaceShips > 0)
            {
                projectileSystem.draw(spriteBatch);

                spaceShipSystem.draw(spriteBatch);

                asteroidSystem.draw(spriteBatch);

                explosionSystem.draw(spriteBatch);

                scoreSystem.draw(spriteBatch);
            }

            // render the menu (if appropriate)
            menu.draw(spriteBatch);

            spriteBatch.End();

            base.Draw(gameTime);
        }