public void InitData(GotGodGiftListData data) { if (data != null) { if (data.awardList != null) { moneyList.Clear(); } // 数据不够 暂用giftsArea for (int i = 0; i < giftsArea.Length; i++) { if (i < data.awardList.Count) { moneyList.Add(data.awardList[i][1]); } else { moneyList.Add(data.awardList[data.awardList.Count - 1][1]); } } if (data.awardList[0][0] == 110052) { curType = moneyType.isDiamond; } needMoneyNum = data.needStone; this.Init(); } else { List <int[]> tList = Core.Data.ActivityManager.GetRollGamebleList(); if (tList != null && tList.Count > 0) { for (int i = 0; i < giftsArea.Length; i++) { if (i < tList.Count) { moneyList.Add(tList[i][1]); } else { moneyList.Add(tList[tList.Count - 1][1]); } } this.Init(); } btnRoll.isEnabled = false; isCanRoll = false; } }
public static CombineGemsController CreatCombineGemsPanel(System.Action tCallBack, moneyType tType) { UnityEngine.Object obj = WXLLoadPrefab.GetPrefab(WXLPrefabsName.UICombineGemPanel); if (obj != null) { GameObject go = Instantiate(obj) as GameObject; CombineGemsController fc = go.GetComponent <CombineGemsController>(); Transform goTrans = go.transform; go.transform.parent = DBUIController.mDBUIInstance._TopRoot.transform; go.transform.localPosition = Vector3.zero; goTrans.localScale = Vector3.one; RED.TweenShowDialog(go); fc.callBack = tCallBack; fc.curMoneyType = tType; return(fc); } return(null); }