示例#1
0
        void OnEnable()
        {
            dialog  = JsonUtility.FromJson <DialogData>(dialogJson.text);
            uiState = FindObjectOfType <UIState>();
            if (resetSaveInEditor)
            {
                TutorialShowedStatus.ClearAllStatePrefs();
            }

            HideAll();

            uiState.OnStateChanged += OnStateChanged;
        }
示例#2
0
 void OnStateChanged(UIState.State state)
 {
     // check if we should start a dialog
     TutorialShowedStatus.ShowTutorialIfNeeded(state, () => Show(state, dialog.tutorials.GetTutorialForState(state)));
 }