public void HttpRespGemExChange(BaseHttpRequest request, BaseResponse response) { ComLoading.Close(); if (response.status != BaseResponse.ERROR) { HttpRequest rq = request as HttpRequest; if (rq.Type == RequestType.GEM_EXCHANGE) { GemExChangeResponse resp = response as GemExChangeResponse; GemData tempdata = Core.Data.gemsManager.getGemData(resp.data.pid); if (tempdata != null) //if(Core.Data.gemsManager.gemPriceConfig.ContainsKey(resp.data.pid)) { int price = tempdata.price; Debug.Log("Price:" + price); GemDebrisCountInBag -= price; //view.SetGemDebrisNum(GemDebrisCountInBag); } GetGemSucUI.OpenUI(Core.Data.gemsManager.getGems(resp.data.ppid).configData, view.TEXT(9014)); } } else { SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode)); } }
//全部合成返回 void BackGemGroupCombine() { if (count == CombineTimes) { if (tempId != 0) { Gems resultGem = Core.Data.gemsManager.getGems(tempId); if (resultGem != null) { GetGemSucUI.OpenUI(resultGem.configData, view.TEXT(5064)); } } else { // SQYAlertViewMove.CreateAlertViewMove(view.TEXT(9014)); ClearLastSelected(); } Debug.Log(" lv =" + tempLv + "; defaultNum =" + defaultNum + "; successNum = " + successNum); view.SetCombineGemsResult(tempLv, CombineTimes, successNum); GemMouldNumInBag = Core.Data.itemManager.GetBagItemCount(110064); SelectedMouldNum = 0; view.SetSelectedGemNumMouldNum(SelectedMouldNum, GemMouldNumInBag); DBUIController.mDBUIInstance.RefreshUserInfo(); ClearLastSelected(); CombineTimes = 0; } ComLoading.Close(); }
public static void OpenUI(GemData data, string strTitle) { if (_mInstance == null) { Object prefab = PrefabLoader.loadFromPack("JC/GetGemSucUI"); if (prefab != null) { GameObject obj = Instantiate(prefab) as GameObject; RED.AddChild(obj, DBUIController.mDBUIInstance._TopRoot); RED.TweenShowDialog(obj); _mInstance = obj.GetComponent <GetGemSucUI>(); _mInstance.m_data = data; _mInstance.m_strTitle = strTitle; } } else { RED.SetActive(true, _mInstance.gameObject); _mInstance.m_data = data; _mInstance.m_strTitle = strTitle; _mInstance.InitUI(); } }
void HideUI() { Destroy(this.gameObject); _mInstance = null; }
void Awake() { _mInstance = this; }