예제 #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++;
     }
 }
예제 #2
0
        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;
                }
            }
        }
예제 #4
0
        public void GiveQuest()
        {
            QuestList questList = GameObject.FindGameObjectWithTag("Player").GetComponent <QuestList>();

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

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

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

            player.AddQuest(quest);
        }