Exemple #1
0
 public void GiveQuest()
 {
     if (currentIndex < quests.Count)
     {
         QuestList questList = GameObject.FindGameObjectWithTag("Player").GetComponent <QuestList>();
         questList.AddQuest(quests[currentIndex]);
         Debug.Log("Dałem questa " + quests[currentIndex]);
         currentIndex++;
     }
 }
        public void CompleteSelectedObjective(string objective)
        {
            QuestList questList = GameObject.FindWithTag("Player").GetComponent <QuestList>();

            foreach (QuestsToComplete questToComplete in questsToComplete)
            {
                if (questToComplete.quest.HasObjective(objective))
                {
                    questList.CompleteObjective(questToComplete.quest, objective);
                    return;
                }
            }
        }
        public void CompleteObjective()
        {
            QuestList questList = GameObject.FindGameObjectWithTag("Player").GetComponent <QuestList>();

            foreach (QuestStatus status in questList.GetStatuses())
            {
                if (status.GetQuestName() == questName && HasObjective(status) && !status.GetCompletedObjectives().Contains(objectiveName))
                {
                    status.CompleteObjective(objectiveName);
                    questList.RefreshQuestList();
                    canDestroy = true;
                }
            }
        }
Exemple #4
0
        public void GiveQuest()
        {
            QuestList questList = GameObject.FindGameObjectWithTag("Player").GetComponent <QuestList>();

            questList.AddQuest(quest);
        }
Exemple #5
0
        public void CompleteObjective()
        {
            QuestList questList = GameObject.FindGameObjectWithTag("Player").GetComponent <QuestList>();

            questList.CompleteObjective(quest, objective);
        }
Exemple #6
0
        public void UpdateQuestCompletion()
        {
            QuestList questList = GameObject.FindGameObjectWithTag("Player").GetComponent <QuestList>();

            questList.ClearQuest(_quest, _objectiveReference);
        }
Exemple #7
0
        public void GiveQuest()
        {
            QuestList player = GameObject.FindWithTag("Player").GetComponent <QuestList>();

            player.AddQuest(quest);
        }