Ejemplo n.º 1
0
    private void OpenQuestWindow()
    {
        questUI = FindObjectOfType <UI_Manager>().GetQuestUI().GetComponent <QuestUI>();

        questUI.ShowAcptDecButtons();
        questUI.HideRewardButton();
        questUI.HideCheckBox();
        questUI.HideUICloseButton();

        questUI.transform.Find("AD_Buttons").Find("AcceptButton").GetComponent <Button>().onClick.AddListener(AcceptQuest);
        questUI.transform.Find("AD_Buttons").Find("DeclineButton").GetComponent <Button>().onClick.AddListener(DeclineQuest);

        FindObjectOfType <UI_QuestManager>().SetQuest(questObject.quest, portrait);
        FindObjectOfType <UI_Manager>().OpenQuestUI();
    }