Exemplo n.º 1
0
    private void Awake()
    {
        cancelButton.onClick.RemoveAllListeners();
        cancelButton.onClick.AddListener(() => { questController.CancelQuest(myQuest.questName); });
        cancelButton.gameObject.SetActive(true);

        rewardButton.onClick.RemoveAllListeners();
        rewardButton.onClick.AddListener(() =>
        {
            if (questController.QuestCompeletedReward(myQuest))
            {
                rewardButton.interactable = false;
            }
        });

        myButton.onClick.RemoveAllListeners();
        myButton.onClick.AddListener(() => { questController.OnSelectQuest(this); });

        rewardButton.gameObject.SetActive(false);
    }