Exemplo n.º 1
0
    /// <summary>
    /// 퀘스트를 찾는것을 목표로한다.
    /// </summary>
    /// <param name="n">NodeID</param>
    /// <param name="temp">퀘스트 상태</param>
    /// <returns></returns>
    public QuestScriptable SearchQuestion(int n, QuestSelect temp)
    {
        QuestScriptable t = null;

        switch (temp)
        {
        case QuestSelect.Prograss:     //? 진행형일 경우
            if (QuestPrograss.ContainsKey(n))
            {
                t = QuestPrograss[n];
            }
            break;

        case QuestSelect.Completed:     //? 완료형일 경우
            if (QuestCompleted.ContainsKey(n))
            {
                t = QuestCompleted[n];
            }
            break;

        case QuestSelect.Failed:
            if (QuestFailed.ContainsKey(n))
            {
                t = QuestFailed[n];
            }
            break;
        }

        return(t);
    }
Exemplo n.º 2
0
 public override void Initialize()
 {
     object[] array = GameSection.GetEventData() as object[];
     selectSection = (array[0] as QuestSelect);
     GameSection.SetEventData(new object[2]
     {
         false,
         false
     });
     base.Initialize();
 }
Exemplo n.º 3
0
    //callback after the quests are generated as list items; used for setting data on quests
    void setSingleQuestData(GameObject q, int which)
    {
        Quest quest = (Quest)availableQuests[which];

        q.transform.Find("Description").GetComponent <Text>().text =
            quest.type + " " + quest.description;
        Text msg = q.transform.Find("Message").GetComponent <Text> ();

        msg.text  = quest.message;
        msg.color = quest.message_color;
        QuestSelect qs = q.GetComponent <QuestSelect>();

        qs.setQuestSpecifics(which, quest.specifics,
                             quest.long_message);
        qs.questLoader = questLoader;

        if (quest.ongoing)
        {
            q.GetComponent <Image>().color = Color.cyan;               //diff color for ongoing quest
        }
    }
Exemplo n.º 4
0
 private void OnSecondaryQuest()
 {
     questSelect     = QuestSelect.Secondary;
     detailText.text = "支线";
 }
Exemplo n.º 5
0
 //-------------------------------<任务QuestPanel>--------------------------------
 private void OnMainQuest()
 {
     questSelect     = QuestSelect.Main;
     detailText.text = "主线";
 }