public void CheckQuestDestroy() { QuestPanel deleteQuestPanel = null; for (int i = 0; i < questDay.transform.childCount; i++) { GameObject go = questDay.transform.GetChild(i).gameObject; deleteQuestPanel = go.GetComponent <QuestPanel> (); if (deleteQuestPanel.bIsQuest == false) { deleteQuestPanel.bIsQuest = false; deleteQuestPanel.startButton.SetActive(false); questObjectPool.ReturnObject(go); questObjects.Remove(deleteQuestPanel); questPopUpWindow_YesButton.onClick.RemoveListener(CheckQuestDestroy); questPopUpWindow_YesButton.onClick.RemoveListener(() => GameObjectSetActive(questPopUpWindow_YesNo, false)); deleteQuestPanel = null; } } //퀘스트 타이머의 시간이 꺼져있을때 if (questTimer.isTimeOn == false) { questTimer.StartQuestTimer(); } }
public void CheckQuestDestroy(int _questIndex) { QuestPanel deleteQuestPanel = null; SoundManager.instance.PlaySound(eSoundArray.ES_TouchSound_Menu); for (int i = 0; i < questDay.transform.childCount; i++) { GameObject go = questDay.transform.GetChild(i).gameObject; deleteQuestPanel = go.GetComponent <QuestPanel> (); if (deleteQuestPanel.nQuestPanelIndex == _questIndex) { if (deleteQuestPanel.bIsQuest == false) { deleteQuestPanel.bIsQuest = true; deleteQuestPanel.completeButton.SetActive(false); deleteQuestPanel.nCompareCondition = 0; deleteQuestPanel.nCompleteCondition = 0; deleteQuestPanel.nMutiplyValue = 0; deleteQuestPanel.questTypeIndex = QuestType.E_QUESTTYPE_NONE; deleteQuestPanel.questData = null; deleteQuestPanel.nQuestIndex = -1; questObjectPool.ReturnObject(go); questObjects.Remove(deleteQuestPanel); } deleteQuestPanel = null; } } SaveQuestData(); //퀘스트 타이머의 시간이 꺼져있을때 if (questTimer.isTimeOn == false) { questTimer.StartQuestTimer(); } }