Exemplo n.º 1
0
 protected virtual void ShowOfferQuest(Quest quest)
 {
     if (questDialogueUI == null)
     {
         if (Debug.isDebugBuild)
         {
             Debug.LogWarning("Quest Machine: There is no Quest Dialogue UI.", this);
         }
     }
     else if (quest == null)
     {
         if (Debug.isDebugBuild)
         {
             Debug.LogWarning("Quest Machine: The quest passed to ShowOfferQuest() is null.", this);
         }
     }
     else if (playerQuestListContainer == null)
     {
         if (Debug.isDebugBuild)
         {
             Debug.LogWarning("Quest Machine: There is no Player Quest List Container. Can't offer quest '" + quest.title + "'.", this);
         }
     }
     else
     {
         quest.greeterID = StringField.GetStringValue(playerTextInfo.id);
         QuestMachineMessages.DiscussQuest(player, this, id, quest.id);
         playerQuestListContainer.DeleteQuest(quest.id); // Clear any old instance of repeatable quests first.
         questDialogueUI.ShowOfferQuest(myQuestGiverTextInfo, quest, OnAcceptQuest, OnQuestBackButton);
         QuestMachineMessages.DiscussedQuest(player, this, id, quest.id);
     }
 }
Exemplo n.º 2
0
        protected virtual void ShowActiveQuest(Quest quest)
        {
            QuestParameterDelegate backButtonDelegate = null;

            if (activeQuests.Count + offerableQuests.Count >= 2)
            {
                backButtonDelegate = OnQuestBackButton;
                allowBackButton    = true; // May turn in quest and be left with only 1. In this case, still allow back button.
            }
            quest.greeterID = StringField.GetStringValue(playerTextInfo.id);
            QuestMachineMessages.DiscussQuest(player, this, id, quest.id);
            questDialogueUI.ShowActiveQuest(myQuestGiverTextInfo, quest, OnContinueActiveQuest, backButtonDelegate);
            QuestMachineMessages.DiscussedQuest(player, this, id, quest.id);
        }