void EndTutorial() { Sequence tutorialEndSequence = DOTween.Sequence(); tutorialEndSequence.Append(nextText.transform.DOScale(0, .4f).SetEase(Ease.InElastic)); tutorialEndSequence.Insert(.1f, AButtonImage.transform.DOScale(0, .4f).SetEase(Ease.InElastic)); tutorialEndSequence.Insert(.2f, backgroundImage.transform.DOScale(0, .5f).SetEase(Ease.InElastic)); tutorialEndSequence.onComplete += () => OnTutorialEnd.Invoke(); }
void Stop() { if (!isStarted) { return; } isStarted = false; OnTutorialEnd?.Invoke(); Debug.Log("Tutorial ended", this); }
private void OnContinueButtonPressed() { if (pageIndex < tutorialPages.Count) { UpdateCurrentTutorialPage(); } else { Debug.Log("Tutorial has ended."); OnTutorialEnd?.Invoke(); } }
private void BeginTutorial() { if (PlayerPrefs.HasKey(PlayerPrefsKeys.TUTORIAL_KEY)) { Debug.Log("Tutorial has already been done."); OnTutorialEnd?.Invoke(); } else { PlayerPrefs.SetInt(PlayerPrefsKeys.TUTORIAL_KEY, 1); Debug.Log("Tutorial has begun."); OnTutorialBegin?.Invoke(); } }