示例#1
0
        public void Complete()
        {
            //Debug.LogFormat("{0}/{1}:TutorialStep - tutorial step completed", transform.parent.name, transform.name);

            foreach (TutorialTask tt in tasks)
            {
                tt.Reset();
            }

            if (TutorialManager.currentTutorial != null)
            {
                TutorialManager.AnalyticsTutorialStep(TutorialManager.currentTutorial.id, _stepNumber++);
            }

            if (_nextStep != null)
            {
                _nextStep.Activate();
            }
            else     // Whole tutorial done
            {
                TutorialManager.CompleteCurrentTutorial();
                TutorialPanel.DestroyInstance();
            }

            completed?.Invoke();

            Destroy(gameObject);
        }
 // Debug only
 private void Update()
 {
     if (Input.GetKeyUp(KeyCode.V))
     {
         TutorialPanel.DestroyInstance();
         TutorialManager.CompleteCurrentTutorial();
     }
 }
        public static void AbortCurrentTutorial()
        {
            if (currentTutorial == null)
            {
                Debug.LogError("TutorialManager:EndCurrentTutorial - currentTutorial=null, ignore this if debuuging in Editor mode");
                return;
            }

            CompleteCurrentTutorial();
            //TutorialHintController.DestroyAll();
            TutorialPanel.DestroyInstance();
        }