Esempio n. 1
0
 // you can't do questObject = new QuestObject() above because the execution order of scripts get massed up
 private static void CreateQuestObjectIfNull()
 {
     if (questObject == null)
     {
         questObject = new QuestObject();
     }
 }
Esempio n. 2
0
 public static void UpdateQuestProgress(QuestObject questObject)
 {
     foreach (var quest in Quests)
     {
         quest.CheckForProgress(questObject);
     }
 }
Esempio n. 3
0
        public bool CheckQuestFulfillment(QuestObject questObject)
        {
            if (questObject.Subject.AssetGUID == this.Subject.AssetGUID &
                questObject.QuestEvent == this.QuestEvent &
                questObject.Object.AssetGUID == this.Object.AssetGUID)
            {
                this.CurrentCount++;
                return(this.questObjectComplete);
            }


            return(false);
        }
Esempio n. 4
0
 public void CheckForProgress(QuestObject questObjectGenerated)
 {
     foreach (QuestObject myQuestObject in questObjects)
     {
         if (myQuestObject.questObjectComplete)
         {
             continue;
         }
         else
         {
             bool objectiveCompleted = myQuestObject.CheckQuestFulfillment(questObjectGenerated);
             this.objectivesCompletedCount += (objectiveCompleted) ? 1 : 0;
             if (this.QuestCompleted)
             {
                 this.OnQuestCompleted.Invoke();
             }
         }
     }
 }