Example #1
0
        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);
            }
        }
Example #2
0
        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);
        }