private void OnTutorialProgress(TutorialProgressEvent gameEvent) { foreach (var tutorial in tutorials) { if (IsTutorialApplicable(tutorial, gameEvent)) { GiveRewards(tutorial.reward); ShowTutorial(tutorial); } } }
private bool IsTutorialApplicable(TutorialConfig.TutorialData tutorial, TutorialProgressEvent progress) { return((tutorial.trigger == progress.trigger) && (tutorial.level == progress.level) && !GlobalState.User.tutorials.HasCompleted(tutorial.id)); }