Exemple #1
0
    public void OnPointerDown(PointerEventData data)
    {
        if (!isSelect)
        {
            questTalkIndex = questManager.GetQuestTalkIndex(id1);
            try
            {
                talkManager.Chat(false, id1 + questTalkIndex);
            }
            catch (Exception) { Debug.Log("58"); }
            if (talkManager.getIsEnd())
            {
                if (talkManager.isNextTalk(id1 + questTalkIndex))
                {
                    questManager.CheckQuest(id1);
                }

                questTalkIndex = questManager.GetQuestTalkIndex(id1);
                if (talkManager.getAnswer(id1 + questTalkIndex).Count != 0)
                {
                    answer1.text = talkManager.getAnswer(id1 + questTalkIndex)[0].ToString();
                    answer2.text = talkManager.getAnswer(id1 + questTalkIndex)[1].ToString();
                    selectPanel.SetActive(true);
                    if (answer1.text == answer2.text)
                    {
                        button2.gameObject.SetActive(false);
                    }
                    isSelect = true;
                }
            }
        }
    }