Exemple #1
0
        private void Update()
        {
            if (QuestGoalFinished(currentQuestGoal))
            {
                currentQuestGoal.OnFinish();
                QuestGoals.RemoveAt(QuestGoals.IndexOf(currentQuestGoal));
            }

            if (QuestGoals.Count != 0)
            {
                currentQuestGoal = QuestGoals[0];
            }

            if (QuestFinished())
            {
                PlayerStats.Singleton.AddEXP(EXP);
                StartCoroutine(UIManager.Singleton.ShowQuestEndScreen(Name));
                PlayerQuestsManager.Singleton.availableQuests.RemoveAt(PlayerQuestsManager.Singleton.availableQuests.IndexOf(this));
                Destroy(this.transform.parent.gameObject);
            }
        }
Exemple #2
0
 public bool QuestGoalFinished(QuestGoal goal)
 {
     return(goal.Finished());
 }