public void Update(float dt) { if (HasWon || HasDied) { return; } bool hasWon = true; foreach (World w in Worlds) { if (w.HasDied) { HasDied = true; return; } // All worlds have to win before the level is complete if (!w.HasWon) { hasWon = false; } } if (hasWon) { HasWon = true; return; } Worlds.ForEach(w => w.Update(dt)); }
public void Draw() { Worlds.ForEach(w => w.Draw()); Game.GraphicsDevice.Viewport = Viewport; DrawBorders(); }