Пример #1
0
 public LevelRenderer(Level level)
 {
     _level = level;
     _worldRenderer = new WorldRenderer(level.World);
 }
Пример #2
0
        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;
        }