private void CreateLevelMap(bool restartLevel) { if (restartLevel) { levelManager.Restart(); } else { levelManager.MoveNext(); levelManager.Load(); } bricks.Clear(); foreach (var brick in levelManager.GetCurrent().Bricks) { bricks.Add(brick); } }
private void InitializeNewLevel(bool restart) { ReinitBall(); if (restart) { levelManager.Restart(); } else { levelManager.MoveNext(); levelManager.Load(); } LevelEventArgs background = new LevelEventArgs(levelManager.GetCurrent().BackgroundPath); OnChangeLevel?.Invoke(this, background); }