//저장되어있던 데이터 배치 public void QuestSaveDataDispatch() { for (int i = 0; i < questObjects.Count; i++) { QuestPanel questPanel = questObjects[i].gameObject.GetComponent <QuestPanel> (); questPanel.GetQuest(GameManager.Instance.cQuestSaveListInfo[i], this); } }
//저장되어있던 데이터 배치 public void QuestSaveDataDispatch() { for (int i = 0; i < questObjects.Count; i++) { QuestPanel questPanel = questObjects[i].gameObject.GetComponent <QuestPanel> (); if (i == 0) { questPanel.GetQuest(questDatas [GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex01], this, GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex01_ProgressValue, GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex01_MultiplyValue); } if (i == 1) { questPanel.GetQuest(questDatas [GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex02], this, GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex02_ProgressValue, GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex02_MultiplyValue); } if (i == 2) { questPanel.GetQuest(questDatas [GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex03], this, GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex03_ProgressValue, GameManager.Instance.cQuestSaveListInfo [0].nQuestIndex03_MultiplyValue); } } if (GameManager.Instance.cQuestSaveListInfo [0].nCurMileValue != 0) { nQuestMileCount = GameManager.Instance.cQuestSaveListInfo [0].nCurMileValue; } if (GameManager.Instance.cQuestSaveListInfo [0].isMileReward01 == true) { rewardCheckImage01.SetActive(true); } if (GameManager.Instance.cQuestSaveListInfo [0].isMileReward02 == true) { rewardCheckImage02.SetActive(true); } if (GameManager.Instance.cQuestSaveListInfo [0].isMileReward03 == true) { rewardCheckImage03.SetActive(true); } SaveQuestData(); }
//Data 할당 public void QuestDataDispatch() { for (int i = 0; i < questObjects.Count; i++) { QuestPanel questPanel = questObjects[i].gameObject.GetComponent <QuestPanel> (); int random = Random.Range(0, nQuestTotalCount); questPanel.GetQuest(questDatas [random], this); } }
//Data 할당 public void QuestDataDispatch(int _index) { nQuestTotalCount = GameManager.Instance.cQusetInfo.Length; if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 6; } if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 5; } if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 4; } if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 3; } Debug.Log("Dispatch Quest"); QuestPanel questPanel = questObjects[_index].gameObject.GetComponent <QuestPanel> (); //questPanel.InitQuestValue (); int random = Random.Range(0, nQuestTotalCount - 1); //Data Input questPanel.GetQuest(questDatas [random], this); questPanel.questTypeIndex = (QuestType)questDatas [random].nType; SaveQuestData(); }
public void QuestDataDispatchInit(int _index) { nQuestTotalCount = GameManager.Instance.cQusetInfo.Length; if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 6; } if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 5; } if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 4; } if (GameManager.Instance.cBossPanelListInfo [0].isUnlockIceBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == true && GameManager.Instance.cBossPanelListInfo [0].isUnlockSasinBoss == false) { nQuestTotalCount -= 3; } Debug.Log("Dispatch Quest"); QuestPanel questPanel = questObjects[_index].gameObject.GetComponent <QuestPanel> (); int random = Random.Range(0, nQuestTotalCount - 1); questPanel.GetQuest(questDatas [random], this); isInGameOnOff = true; }
//퀘스트 초기화 시작 public void QuestInitStart() { GameObject quest; questAdsPopUpWindow_YesNo.SetActive(false); //처음 퀘스트 켜질시 if (GameManager.Instance.cQuestSaveListInfo [0].bIsFirstActive == true) { Debug.Log("Quest Fire Dispatch"); GameManager.Instance.cQuestSaveListInfo [0].bIsFirstActive = false; nQuestCount = 0; AllDestroyQuest(); questObjects.Clear(); //Add for (int i = 0; i < nQuestMaxHaveCount; i++) { quest = questObjectPool.GetObject(); quest.transform.SetParent(questDay.transform, false); quest.transform.localScale = Vector3.one; QuestPanel questPanel = quest.gameObject.GetComponent <QuestPanel> (); questPanel.nQuestPanelIndex = i; questPanel.bIsQuest = true; questPanel.nCompareCondition = 0; questPanel.nCompleteCondition = 0; questPanel.questTypeIndex = QuestType.E_QUESTTYPE_NONE; questPanel.nMutiplyValue = 0; questPanel.questData = null; questPanel.nQuestIndex = -1; int nQuestIndex = GetQuestRandomIndex(); questPanel.GetQuest(GameManager.Instance.cQusetInfo [nQuestIndex], this); questObjects.Add(questPanel); } SaveQuestData(); questTimer.isTimeOn = false; questTimer.isTimeEnd = false; questTimer.InitQuestTimer(); //Timer On questTimer.addQuestToEmptySpace.SetActive(false); questTimer.SaveTime(); //Save Time return; } //시간이 다 안되고 초기화 버튼을 누를시 if (questTimer.isTimeEnd == false && isInitConfirm == true) { Debug.Log("NoTime And Init Call!"); nQuestCount = 0; //개수가 최대 개수와 같으면 경고창을 띄운다 if (questObjects.Count >= nQuestMaxHaveCount) { ShowEmptyQuestFull(); questTimer.isTimeOn = false; questTimer.isTimeEnd = false; questTimer.InitQuestTimer(); return; } for (int i = questObjects.Count; questObjects.Count < nQuestMaxHaveCount; i++) { nQuestCount++; quest = questObjectPool.GetObject(); quest.transform.SetParent(questDay.transform, false); quest.transform.localScale = Vector3.one; QuestPanel questPanel = quest.gameObject.GetComponent <QuestPanel> (); questPanel.nQuestPanelIndex = i; questPanel.bIsQuest = true; questPanel.nCompareCondition = 0; questPanel.nCompleteCondition = 0; questPanel.questTypeIndex = QuestType.E_QUESTTYPE_NONE; questPanel.nMutiplyValue = 0; questPanel.questData = null; questPanel.nQuestIndex = -1; int nQuestIndex = GetQuestRandomIndex(); questPanel.GetQuest(GameManager.Instance.cQusetInfo [nQuestIndex], this); questObjects.Add(questPanel); } SaveQuestData(); questTimer.isTimeOn = false; questTimer.isTimeEnd = false; questTimer.InitQuestTimer(); questTimer.addQuestToEmptySpace.SetActive(false); return; } //초기화 버튼을 누를시 빈곳에 랜덤으로 넣어준다 if (isInitConfirm == true && questTimer.isTimeEnd == true) { nQuestCount = 0; isInitConfirm = false; questTimer.isTimeOn = false; questTimer.InitQuestTimer(); //개수가 최대 개수와 같으면 경고창을 띄운다 if (questObjects.Count >= nQuestMaxHaveCount) { ShowEmptyQuestFull(); questTimer.isTimeOn = false; questTimer.isTimeEnd = false; questTimer.InitQuestTimer(); return; } for (int i = questObjects.Count; i < nQuestMaxHaveCount; i++) { nQuestCount++; quest = questObjectPool.GetObject(); quest.transform.SetParent(questDay.transform, false); quest.transform.localScale = Vector3.one; QuestPanel questPanel = quest.gameObject.GetComponent <QuestPanel> (); questPanel.bIsQuest = true; questPanel.nCompareCondition = 0; questPanel.nCompleteCondition = 0; questPanel.questTypeIndex = QuestType.E_QUESTTYPE_NONE; questPanel.nMutiplyValue = 0; questPanel.questData = null; questPanel.nQuestIndex = -1; int nQuestIndex = GetQuestRandomIndex(); questPanel.GetQuest(GameManager.Instance.cQusetInfo [nQuestIndex], this); questObjects.Add(questPanel); //QuestDataDispatch (i); //Data Dispatch } SaveQuestData(); questTimer.isTimeOn = false; questTimer.isTimeEnd = false; questTimer.InitQuestTimer(); questTimer.addQuestToEmptySpace.SetActive(false); return; } // }