Example #1
0
        public void Awake()
        {
            questNotifier = (QuestNotifier)target;
            quests        = QuestCollection.GetInstance().quests;

            if (questNotifier.targetSelections == null)
            {
                questNotifier.targetSelections = new List <Selection>();
                for (int i = 0; i < questNotifier.amountOfQuestsToChange; i++)
                {
                    Selection newSelection = new Selection
                    {
                        targetQuest   = quests[0],
                        desiredStatus = quests[0].status
                    };
                    questNotifier.targetSelections.Add(newSelection);
                }
            }

            if (questTitles == null)
            {
                questTitles = new List <string>();
                for (int i = 0; i < quests.Count; i++)
                {
                    questTitles.Add(quests[i].title);
                }
            }

            currentAmountOfQuestsToChange = questNotifier.amountOfQuestsToChange;
        }
Example #2
0
        protected override void Awake()
        {
            base.Awake();
            QuestCollection collection = QuestCollection.GetInstance();

            activeQuestCollection = ScriptableObject.CreateInstance <QuestCollection>();
            activeQuestCollection.Copy(collection);
        }
Example #3
0
 public void OnValidate()
 {
     foreach (var quest in QuestCollection.GetInstance().quests)
     {
         if (quest.title == questString)
         {
             serializedQuest = quest;
             break;
         }
     }
 }