public void Spawn() { _saveLoadLevel.Load(); _activeLevel = _saveLoadLevel.SavedLevelData.ActiveLevels; for (int i = 0; i < _levelsContainer.Levels.Count; i++) { LevelButtonControler button = Instantiate(_buttonController, _parentForLevelButton); button.SetCountNumberLevelButton(i); if (i <= _activeLevel) { button.SetIsActiveLevelButton(true); } button.GetComponent <LevelButtonView>().ShowInfo(); LevelButtons.Add(button); } }
public void Initialization() { _loadData.Load(); ActiveLevel = _loadData.SavedLevelData.SelectedLevel; SetCurrentLevel(); }