/// <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); if (!loadingThread.IsAlive) { //draw main game components gameState.Draw(spriteBatch); spriteBatch.Begin(); //draw mute/unmute button if (music.IsMuted) { button.BtnMute.Draw(spriteBatch); } else { button.BtnUnMute.Draw(spriteBatch); } spriteBatch.End(); } //draw loading animation else { loading.Draw(spriteBatch, GraphicsDevice); } base.Draw(gameTime); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.White); gameState.Draw(spriteBatch, GraphicsDevice); spriteBatch.Begin(); if (music.isMuted) { button.btnMute.Draw(spriteBatch); } else { button.btnUnMute.Draw(spriteBatch); } spriteBatch.End(); base.Draw(gameTime); }