示例#1
0
    public void Setup(QuestStatus status)
    {
        this.title.text = status.GetQuest().GetTitle();

        parent.DetachChildren();

        foreach (var obj in status.GetQuest().GetObjectives())
        {
            ObjectiveItemUI item = Instantiate(objectiveUIButton, parent);

            bool isComplete = false;
            if (status.GetCompletedObjectives().Contains(obj.reference))
            {
                isComplete = true;
            }

            item.Setup(obj.description, isComplete);
        }

        rewardText.text = "";
        foreach (var reward in status.GetQuest().GetRewards())
        {
            rewardText.text += reward.number + "x " + reward.item.name + "\n";
        }
        if (rewardText.text == "")
        {
            rewardText.text = "No Reward.";
        }
    }
示例#2
0
 public void Setup(QuestStatus status)
 {
     this.status         = status;
     questTitle.text     = status.GetQuest().Title();
     questProgress.text  = status.GetCompletedObjectives().Count + "/" + status.GetQuest().Objectives().Count;
     questTitle.color    = (status.IsComplete()) ? completedColor : activeColor;
     questProgress.color = (status.IsComplete()) ? completedColor : activeColor;
 }
示例#3
0
    public void Setup(QuestStatus status)
    {
        title.text = status.GetQuest().GetTitle();

        int completed = status.GetCompletedObjectives().Count();

        progress.text = completed + "/" + status.GetQuest().GetObjectiveCount().ToString();
        GetComponent <QuestToolTipSpawner>().Setup(status);
    }