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(); } }
private IEnumerator WaitAndCompleteCoroutine() { yield return(new WaitForSecondsRealtime(timeoutSeconds)); DoComplete(); if (completeTutorialIfTimeout) { TutorialManager.CompleteCurrentTutorial(); } }