예제 #1
0
    private void CreateQuestNode(HexQuest quest)
    {
        QuestNodeUI nodeQuest = prefabQuest;

        if (quest.id != 1)
        {
            nodeQuest = Instantiate <QuestNodeUI>(prefabQuest);
            nodeQuest.transform.SetParent(prefabQuest.transform.parent, false);
        }
        nodeQuest.gameObject.SetActive(true);
        nodeQuest.InitData(quest);
        nodeQuest.onSelect = OnSelectQuest;
        quests.Add(nodeQuest);
        prefabQuestNew.transform.SetAsLastSibling();
    }
예제 #2
0
    private void CreateCustomNode(HexQuest quest)
    {
        QuestNodeUI nodeQuest = customPrefab;

        if (quest.id != 1)
        {
            nodeQuest = Instantiate <QuestNodeUI>(customPrefab);
            nodeQuest.transform.SetParent(customPrefab.transform.parent, false);
        }
        nodeQuest.gameObject.SetActive(true);
        nodeQuest.InitData(quest);

        EventTriggerListener.Get(nodeQuest.gameObject).onClick =
            (go) => {
            CustomModel.Instance.crtQuest = quest;
            UIManager.Instance.OpenUI("CustomView");
        };
    }