public override void Draw(SpriteBatch spriteBatch) { for (int i = 1; i <= 3; i++) { if (i % 2 == 1) { spriteBatch.Draw(Content.Load <Texture2D>("Cloud1"), new Vector2(150 * i, 100), Color.White); } else { spriteBatch.Draw(Content.Load <Texture2D>("Cloud2"), new Vector2(150 * i, 100), Color.White); } } spriteBatch.Draw(Content.Load <Texture2D>("Grass3"), new Vector2(100, 405), Color.White); spriteBatch.Draw(Content.Load <Texture2D>("Grass2"), new Vector2(500, 386), Color.White); Brickmanager.Draw(spriteBatch); Itemmanager.Draw(spriteBatch); Enemymanager.Draw(spriteBatch); if (mario != null) { spriteBatch.Draw(Content.Load <Texture2D>("MarioLives"), new Vector2(20, 20), Color.White); spriteBatch.DrawString(spriteFont, mario.Lives.ToString(), new Vector2(112, 29), Color.White); mario.Draw(spriteBatch); spriteBatch.Draw(Content.Load <Texture2D>("count coins"), new Vector2(200, 20), Color.White); spriteBatch.DrawString(spriteFont, mario.num_coins.ToString(), new Vector2(280, 29), Color.White); mario.Draw(spriteBatch); } }
public override void Draw(SpriteBatch spriteBatch) { spriteBatch.Draw(Content.Load <Texture2D>("Cloud1"), new Vector2(50, 100), Color.White); spriteBatch.Draw(Content.Load <Texture2D>("Cloud1"), new Vector2(250, 100), Color.White); spriteBatch.Draw(Content.Load <Texture2D>("Cloud1"), new Vector2(450, 100), Color.White); spriteBatch.Draw(Content.Load <Texture2D>("Grass4"), new Vector2(730, 410), Color.White); Brickmanager.Draw(spriteBatch); Enemymanager.Draw(spriteBatch); if (mario != null) { spriteBatch.Draw(Content.Load <Texture2D>("MarioLives"), new Vector2(20, 20), Color.White); spriteBatch.DrawString(spriteFont, mario.Lives.ToString(), new Vector2(112, 29), Color.White); mario.Draw(spriteBatch); spriteBatch.Draw(Content.Load <Texture2D>("count coins"), new Vector2(200, 20), Color.White); spriteBatch.DrawString(spriteFont, mario.num_coins.ToString(), new Vector2(280, 29), Color.White); mario.Draw(spriteBatch); } }
public override void Draw(SpriteBatch spriteBatch) { if (mario != null) { mario.Draw(spriteBatch); } Brickmanager.Draw(spriteBatch); Itemmanager.Draw(spriteBatch); if (mario != null) { spriteBatch.Draw(Content.Load <Texture2D>("MarioLives"), new Vector2(20, 20), Color.White); spriteBatch.DrawString(spriteFont, mario.Lives.ToString(), new Vector2(112, 29), Color.White); mario.Draw(spriteBatch); spriteBatch.Draw(Content.Load <Texture2D>("count coins"), new Vector2(200, 20), Color.White); spriteBatch.DrawString(spriteFont, mario.num_coins.ToString(), new Vector2(280, 29), Color.White); mario.Draw(spriteBatch); } }