public void Draw(SpriteBatch spriteBatch) { camera.BeginDraw(spriteBatch); background.Draw(spriteBatch); spriteBatch.End(); LightPolygon.BeginDraw(); foreach (Light light in lights) { light.Draw(); } LightPolygon.EndDraw(spriteBatch); camera.BeginDraw(spriteBatch); player.Draw(spriteBatch); foreach (IObstacle obstacle in obstacles) { obstacle.Draw(spriteBatch); } spriteBatch.End(); }
public static void BeginDraw() { LightPolygon.BeginDraw(); }