/// <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.White); //Start Menu controls if (currentStartMenu._isEnabled) { //Prepare the Drawing components to send to the objects GameDrawClassComponents curDrawComponents = new GameDrawClassComponents(); curDrawComponents = new GameDrawClassComponents(Content, staticTextureImages, staticFonts, this, spriteBatch, GraphicsDevice, screenWidth, screenHeight); currentStartMenu.drawStartMenu(curDrawComponents); } //Check if a game is running if (currentGalaxyGame._gameIsRunning) { //Prepare the Drawing components to send to the objects GameDrawClassComponents curDrawComponents = new GameDrawClassComponents(); curDrawComponents = new GameDrawClassComponents(Content, staticTextureImages, staticFonts, this, spriteBatch, GraphicsDevice, screenWidth, screenHeight); currentGalaxyGame.displayGameScreen(curDrawComponents); } base.Draw(gameTime); }