Exemplo n.º 1
0
    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));
        }
    }
Exemplo n.º 2
0
    //全部合成返回
    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();
    }
Exemplo n.º 3
0
 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();
     }
 }
Exemplo n.º 4
0
 void HideUI()
 {
     Destroy(this.gameObject);
     _mInstance = null;
 }
Exemplo n.º 5
0
 void Awake()
 {
     _mInstance = this;
 }