예제 #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();
     }
 }
예제 #2
0
 public static void UpdateQuestProgress(QuestObject questObject)
 {
     foreach (var quest in Quests)
     {
         quest.CheckForProgress(questObject);
     }
 }
예제 #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);
        }
예제 #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();
             }
         }
     }
 }