Exemplo n.º 1
0
    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);
        }
    }
Exemplo n.º 2
0
 public void Initialization()
 {
     _loadData.Load();
     ActiveLevel = _loadData.SavedLevelData.SelectedLevel;
     SetCurrentLevel();
 }