public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.BeginCam(camera); MapFirst.Draw(spriteBatch, true); if (isShown) { if (Player.pos.X >= 0 && Player.pos.Y >= 0) { spriteBatch.Draw(TexturesManager.Tile, Player.pos); } } foreach (Monster entity in Entities.OfType <Monster>()) { entity.Draw(gameTime, spriteBatch); } Player.Draw(gameTime, spriteBatch); MapFirst.Draw(spriteBatch, false); foreach (WorldEffect worldEffect in WorldEffects) { worldEffect.Draw(gameTime, spriteBatch); } if (gameTime.TotalGameTime.TotalMilliseconds % 10000 < 10) { i = RandomManager.Next(0, 2); } Temps.Pluie(spriteBatch, gameTime, MapFirst.Data, i == 1 ? false : true); Temps.Neige(spriteBatch, gameTime, MapFirst.Data, i == 2 ? false : true); spriteBatch.End(); spriteBatch.Begin(); MainGame.cursor.Draw(spriteBatch); foreach (Entity entity in Entities) { entity.DrawUI(gameTime, spriteBatch); } Player.DrawUI(gameTime, spriteBatch); foreach (Window win in Windows) { win.Draw(gameTime, spriteBatch); } if (isShown) { DrawInfo(gameTime, spriteBatch, Color.White); } spriteBatch.End(); }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.BeginCam(Camera); MapFirst.Draw(spriteBatch, true, Player.CanMove ? Player.Position : Player.AstralPosition); foreach (Monster entity in Entities.OfType <Monster>()) { entity.Draw(gameTime, spriteBatch); } Player.Draw(gameTime, spriteBatch); MapFirst.Draw(spriteBatch, false, Player.CanMove ? Player.Position : Player.AstralPosition); spriteBatch.End(); spriteBatch.Begin(); foreach (Entity entity in Entities) { entity.DrawUI(gameTime, spriteBatch); } Player.DrawUI(gameTime, spriteBatch); foreach (WorldEffect worldEffect in WorldEffects) { worldEffect.Draw(gameTime, spriteBatch); } foreach (Window win in Windows) { win.Draw(gameTime, spriteBatch); } if (isShown) { DrawInfo(gameTime, spriteBatch, Color.White); } spriteBatch.End(); }