Exemple #1
0
    private void Start()
    {
        // Get all the levels
        LevelID[] ids = LevelSettings.GetAllLevelIDs();
        foreach (LevelID id in ids)
        {
            LevelData data = LevelSettings.GetLevelData(id);
            if (data.Tutorials.Length > 0)
            {
                foreach (TutorialData tutorial in data.Tutorials)
                {
                    TutorialButton button = Instantiate(buttonPrefab, buttonParent);
                    button.TutorialManager     = tutorialManager;
                    button.Tutorial            = tutorial;
                    button.Button.interactable = PlayerData.GetCompletionData(id).Encountered;

                    if (button.Button.interactable)
                    {
                        dropdown.AddDropdownDisableButton(button.Button);
                    }
                }
            }
        }
    }