public LevelRenderer(Level level) { _level = level; _worldRenderer = new WorldRenderer(level.World); }
private void LoadLevel() { _level = Level.Generate(); _levelRenderer = new LevelRenderer(_level); _level.EntityWorld.Services.Add<IGameContainer>(this); _level.UiContainer.Add(new TexturedButton(new Sprite(SkypieaViewConstants.LoadTexture(this.ContentProvider, "PauseButton")), new Vector2(this.Game.ScreenSize.Width - 32, 24), this.Pause) { InflateAmount = 32 }); _levelRenderer.LoadContent(); _level.GameOver += this.OnGameOver; }