/// <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 (State == "playing") { Multiverse.Draw(); if (Multiverse.HasWon) { SpriteBatch.Begin(); SpriteBatch.DrawString(GameFont, "VERY NICE. GREAT SUCCESS!", new Vector2(10, 10), Color.Black); if (HasNextLevel()) { SpriteBatch.DrawString(GameFont, "Press N to continue...", new Vector2(10, 30), Color.Black); } SpriteBatch.End(); } } else if (State == "levelselection") { var presParams = GraphicsDevice.PresentationParameters; LevelSelectionDesktop.Bounds = new Rectangle(0, 0, presParams.BackBufferWidth, presParams.BackBufferHeight); LevelSelectionDesktop.Render(); } base.Draw(gameTime); }
/// <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); Multiverse.Draw(); if (Multiverse.HasWon) { SpriteBatch.Begin(); SpriteBatch.DrawString(GameFont, "VERY NICE. GREAT SUCCESS!", new Vector2(10, 10), Color.Black); SpriteBatch.End(); } base.Draw(gameTime); }