public void Draw(GameTime gameTime) { //_background2.Draw(_spriteBatch); _spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, Camera2D.View); //GraphicsHandler.DrawSprites(_backgroundSprites, _spriteBatch); _backgroundObjectsHandler.Draw(_spriteBatch); GraphicsHandler.DrawSprites(_spriteList, _spriteBatch); _player.Draw(_spriteBatch); foreach (var gameObject in _objectList) { gameObject.Draw(_spriteBatch); } _spriteBatch.End(); foreach (var item in _wallList) { item.Draw(_spriteBatch); } Matrix projection = Camera2D.SimProjection; Matrix view = Camera2D.SimView; _debugView.RenderDebugData(ref projection, ref view); }
public void Draw(GameTime gameTime) { graphicsHandler.DrawSprites(backgroundSprites); foreach (Plant plant in plantList) { plant.Draw(graphicsHandler); } graphicsHandler.DrawSprites(raindropsList); graphicsHandler.DrawSprites(spriteList); player.Draw(graphicsHandler); foreach (PoisonCloud cloud in poisonCloudList) { cloud.Draw(graphicsHandler); } foreach (DeathFactory factory in deathFactoryList) { factory.Draw(graphicsHandler); } }