IEnumerator ItemEnable() { //일단 방법은 대충 적어놓으면 cloudRecoTrackableHandler에서 list 값들 가져오고 itemExp값들 가져와서 //식물 선택 안돼있을때 if (plantListDropdown.value == 0) { Debug.Log("Please Select Plant"); } //사용개수 제한하는건 ConfirmMenuCtrl스크립트에서 해줌 else if (state == "enable" && !isDropBtn) { state = "disable"; GameObject instance = Instantiate(wAnim, new Vector3(192, 503, 58), wAnimPlace.rotation) as GameObject; // 애니메이션 재생. waterButton.interactable = false; btColor.color = new Color32(152, 152, 152, 255); Debug.Log("Selected Plant is = " + selectedPlantName); loginScript.Instance.UseItem("wItem", itemNum); loginScript.Instance.ItemCountCheck("wItem"); float exp = 1.0f * (float)itemNum; // where = 식물이름으로 찾는게 아니라 where = 선택된 식물이름의 식물위치 인덱스값 으로 해서 추가 // water 0, sun 1, fertilizer 2, nutrient 3으로 설정한다 일단 StartCoroutine(RenewPlantList()); yield return(new WaitForSeconds(1.0f)); Debug.Log(plantLv.Count); PlantLvUpLogic(0, exp); //_plantExpPanel.CallExpList(); itemNumber = loginScript.wGetItem; currentExp = loginScript.Exp; yield return(new WaitForSeconds(2.5f)); state = "enable"; waterButton.interactable = true; btColor.color = new Color32(255, 255, 255, 255); _cloudRecoTrackableEventHandler.CallExpLogic(); } if (isDropBtn) { Debug.Log("아이템 대기시간"); loginScript.Instance.UseItem("wItem", itemNum); loginScript.Instance.ItemCountCheck("wItem"); itemNumber = loginScript.wGetItem; } }
IEnumerator ItemEnable() { //식물 선택 안돼있을때 if (plantListDropdown.value == 0) { Debug.Log("Please Select Plant"); } //사용개수 제한하는건 ConfirmMenuCtrl스크립트에서 해줌 else if (state == "enable" && !isDropBtn) { state = "disable"; GameObject instance = Instantiate(sunAnim, new Vector3(0, 623, 0), sunAnimPlace.rotation) as GameObject; // 애니메이션 재생. sunButton.interactable = false; btColor.color = new Color32(152, 152, 152, 255); Debug.Log("Selected Plant is = " + selectedPlantName); loginScript.Instance.UseItem("sItem", itemNum); loginScript.Instance.ItemCountCheck("sItem"); float exp = 1.0f * (float)itemNum; //loginScript.Instance.UpdatePlantListTable(selectedPlantName, 0, "SunEXP", 0, 1, exp, false); // water 0, sun 1, fertilizer 2, nutrient 3으로 설정한다 일단 StartCoroutine(RenewPlantList()); yield return(new WaitForSeconds(1.0f)); PlantLvUpLogic(1, exp); //_plantExpPanel.CallExpList(); itemNumber = loginScript.sGetItem; currentExp = loginScript.Exp; yield return(new WaitForSeconds(2.5f)); state = "enable"; sunButton.interactable = true; btColor.color = new Color32(255, 255, 255, 255); //이게 안먹히네***************************************************** _cloudRecoTrackableEventHandler.CallExpLogic(); } if (isDropBtn) { Debug.Log("아이템 대기시간"); loginScript.Instance.UseItem("sItem", itemNum); loginScript.Instance.ItemCountCheck("sItem"); itemNumber = loginScript.sGetItem; } }