Пример #1
0
    private bool CheckRequiredQuests(DialogueData dialogue)
    {
        bool hasQuest = true;

        foreach (Quest quest in dialogue.questsRequired)
        {
            hasQuest &= ActiveQuests.HasQuest(quest.name);
        }
        return(hasQuest);
    }
Пример #2
0
    private void UpdateQuests(DialogueData dialogue)
    {
        foreach (Quest quest in dialogue.questsToAdd)
        {
            if (!ActiveQuests.HasQuest(quest.name))
            {
                ActiveQuests.AddQuest(quest.name, quest);
            }
        }

        foreach (Quest quest in dialogue.questsToComplete)
        {
            if (ActiveQuests.HasQuest(quest.name))
            {
                ActiveQuests.MarkQuestAsComplete(quest.name);
            }
        }
    }