/// <summary> /// THIS METHOD DRAWS THE ACTIVE SPRITES /// IT'S CALLED 60 TIMES A SECCOND /// </summary> /// <param name="gameTime"></param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.White); spriteBatch.Begin(SpriteSortMode.FrontToBack, null); //ALL THE DRAW LOGIC if (menu.Active == true) { menu.Draw(spriteBatch); } if (mainGame.Active == true) { mainGame.Draw(spriteBatch); } userPrompts.Draw(spriteBatch); FPS.Draw(spriteBatch, GraphicsDevice); spriteBatch.End(); base.Draw(gameTime); }
} //LOADS ALL THE CONTENT /// <summary> /// METHOD THAT IS USED TO UPDATE THE GAME /// IT'S CALLED AS MANY TIMES AS POSSIBLE /// </summary> /// <param name="gameTime"></param> protected override void Update(GameTime gameTime) { FPS.totalFrames++; //MAIN GAME if (mainGame.Active == true) { mainGame.Update(gameTime); mainGame.UpdateNoPause(gameTime); } //MENU if (menu.Active == true) { menu.Update(gameTime); } //USER PROMPTS userPrompts.Update(gameTime); FPS.Update(gameTime); base.Update(gameTime); }