public override void Update(GameTime gameTime, SpriteBatch spriteBatch) { //Console.WriteLine("Menu State"); gameBackground.Update(gameTime); //if instructions button is pressed then update if (isInstructionsPressed) { gamemenuoptions.updatesInstructions(gameTime, ref isInstructionsPressed); } else if (isSelectLevelPressed)//if select Level button is pressed then update { levelSelector.update(gameTime, spriteBatch, ref isSelectLevelPressed); } else { foreach (var component in components) { component.Update(gameTime); } } }