public void CommisionQuest() { //Evolution stone을 구매할 수 있게 하기 위해 500골드 줌 GameManager.Instance.InventoryManager.AddGold(500); ShopManager.Instance.clearShopQuest += quest.ClearQuest; ShopManager.Instance.clearShopQuest += SaveQuestData; ShopManager.Instance.clearShopQuest += () => { SoundManager.Instance.PlaySound(Sound.QuestReward); }; ShopManager.Instance.clearShopQuest += () => { ShopManager.Instance.clearShopQuest = null; }; quest.CommisionQuest(); question.SetActive(false); SaveQuestData(); }
//퀘스트 수락버튼 눌렀을 때의 이벤트 public void CommisionQuest() { //강화를 할 수 있도록 1000골드 줌 GameManager.Instance.InventoryManager.AddGold(1000); //그리고 업그레이드 매니저에 있는 델리게이트에 퀘스트 클리어 함수 등록 UpgradeManager.Instance.clearUpgradeQuest += quest.ClearQuest; UpgradeManager.Instance.clearUpgradeQuest += SaveQuestData; UpgradeManager.Instance.clearUpgradeQuest += () => { SoundManager.Instance.PlaySound(Sound.QuestReward); }; UpgradeManager.Instance.clearUpgradeQuest += () => { UpgradeManager.Instance.clearUpgradeQuest = null; }; quest.CommisionQuest(); question.SetActive(false); SaveQuestData(); }