public void OnPointerClick(PointerEventData eventData)
    {
        GameObject getInfoGameObject = eventData.pointerEnter;

        if (getInfoGameObject.gameObject.name == "QuestPanel")
        {
            isQuestWindowOn = false;
            SaveQuestData();
            questTimer.SaveTime();
            questTimer.isTimeOn = false;
            getInfoGameObject.SetActive(false);
        }
    }
Exemple #2
0
    public void OnPointerClick(PointerEventData eventData)
    {
        GameObject getInfoGameObject = eventData.pointerEnter;

        if (getInfoGameObject.gameObject.name == "QuestPanel")
        {
            GameManager.Instance.cQuestSaveListInfo.Clear();
            int curItemCount = questDay.transform.childCount;
            for (int i = 0; i < curItemCount; i++)
            {
                Transform  child           = questDay.transform.GetChild(i);
                QuestPanel childQuestPanel = child.GetComponent <QuestPanel> ();
                GameManager.Instance.cQuestSaveListInfo.Add(childQuestPanel.questData);
            }
            questTimer.SaveTime();



            getInfoGameObject.SetActive(false);
        }

        //Test
        if (getInfoGameObject.gameObject.name == "CompleteButton")
        {
            QuestPanel questPanel = getInfoGameObject.GetComponentInParent <QuestPanel> ();
            questPanel.getGold = questPanel.questData.nCompleteCondition;
            questPanel.textProgressValue.text = questPanel.getGold.ToString() + "/" + questPanel.questData.nCompleteCondition.ToString();
            questPanel.QuestComplete();
            questPanel.bIsQuest = false;
            nQuestMileCount++;

            if (nQuestMileCount == nFirstReward)
            {
                //rewardCheckImage01.color = CheckColor;
                rewardCheckImage01.enabled = true;
            }

            if (nQuestMileCount == nSecondReward)
            {
                //rewardCheckImage02.color = CheckColor;
                rewardCheckImage02.enabled = true;
            }

            if (nQuestMileCount == nThirdReward)
            {
                //rewardCheckImage03.color = CheckColor;
                rewardCheckImage03.enabled = true;
            }
        }
    }