示例#1
0
    public void ShowQuestInfo(Quest quest)
    {
        this.selectedQuest = quest;

        if (QuestLog.MyInstance.HasQuest(quest) && quest.IsComplete)
        {
            AcptBtn.SetActive(false);
            CompleteBtn.SetActive(true);
        }
        else if (!QuestLog.MyInstance.HasQuest(quest))
        {
            AcptBtn.SetActive(true);
        }

        BackBtn.SetActive(true);
        questDescription.SetActive(true);
        questArea.gameObject.SetActive(false);

        string objectives = string.Empty;

        foreach (Objective obj in quest.MyCollectObjectives)
        {
            objectives += obj.MyType + ": " + obj.MyCurrentAmount + "/" + obj.MyAmount + "\n";
        }

        questDescription.GetComponent <Text>().text = string.Format("{0} \n <size=16> {1}</size>", quest.MyTitle, quest.MyDescription);
    }
示例#2
0
 public void Back()
 {
     BackBtn.SetActive(false);
     AcptBtn.SetActive(false);
     ShowQuests(questGiver);
     CompleteBtn.SetActive(false);
 }
示例#3
0
 public override void Close()
 {
     CompleteBtn.SetActive(false);
     base.Close();
 }