/// <summary> /// All objects are drawn here /// </summary> /// <param name="gameTime">Provides a snapshot of timing values</param> /// <param name="spriteBatch">Helper class for drawing strings and sprites</param> public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { _graphicsDevice.Clear(Color.Black); DKTitle.Draw(spriteBatch); playButton.Draw(spriteBatch); infoButton.Draw(spriteBatch); exitButton.Draw(spriteBatch); _mario.Draw(spriteBatch); foreach (var sprite in _menuBarrels) { sprite.Draw(spriteBatch); } _menuKong.Draw(spriteBatch); }
/// <summary> /// All objects are drawn here /// </summary> /// <param name="gameTime">Provides a snapshot of timing values</param> /// <param name="spriteBatch">Helper class for drawing strings and sprites</param> public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { spriteBatch.DrawString(arcadeClassic, "Original game by nintendo", new Vector2(_graphicsDevice.Viewport.Width * 0.05f, _graphicsDevice.Viewport.Height * 0.7f), Color.White); spriteBatch.DrawString(arcadeClassic, "Recreated by Tiago Gama", new Vector2(_graphicsDevice.Viewport.Width * 0.05f, _graphicsDevice.Viewport.Height * 0.7f + arcadeClassic.MeasureString("Original game by nintendo").Y), Color.White); _graphicsDevice.Clear(Color.Black); DKTitle.Draw(spriteBatch); joystickRightLeft.Draw(spriteBatch); marioWalking.Draw(spriteBatch); marioClimbing.Draw(spriteBatch); joystickUpDown.Draw(spriteBatch); arcadeButtons.Draw(spriteBatch); marioJumping.Draw(spriteBatch); goBackButton.Draw(spriteBatch); _mario.Draw(spriteBatch); }
/// <summary> /// All game components are drawn here. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values</param> /// <param name="spriteBatch">Helper class for drawing strings and sprites</param> public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { _graphicsDevice.Clear(Color.Black); brick.Draw(spriteBatch); foreach (Ladder l in allLadders) { l.Draw(spriteBatch); } foreach (List <Brick> lb in ground.Values) { foreach (Brick b in lb) { b.Draw(spriteBatch); } } foreach (Barrel ba in allBarrels) { ba.Draw(spriteBatch); } _princess.Draw(spriteBatch); stackedBarrels.Draw(spriteBatch); foreach (GenericSprite gs in allLives) { gs.Draw(spriteBatch); } oilBarrel.Draw(spriteBatch); _kong.Draw(spriteBatch); _mario.Draw(spriteBatch); spriteBatch.DrawString(arcadeClassic, "HIGHSCORE " + _scoreManager.Highscores[0].Value, new Vector2(_graphicsDevice.Viewport.Width - arcadeClassic.MeasureString("HIGHSCORE " + _scoreManager.Highscores[0].Value).X, 0), Color.White); spriteBatch.DrawString(arcadeClassic, "SCORE " + score, new Vector2(_graphicsDevice.Viewport.Width - arcadeClassic.MeasureString("SCORE " + score).X, arcadeClassic.MeasureString("HIGHSCORE " + _scoreManager.Highscores.Select(c => c.Value)).Y), Color.White); EndGameDisplays(spriteBatch); }