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 void GotGodGiftRefresh(GotGodGiftResponse resp) { if (resp.data != null) { nextData = resp.data.nextAward; myReward = resp.data.award; //自己处理钱的加减 Core.Data.playerManager.ReduceCoin(resp.data.stone, 2); int target = moneyList.IndexOf(resp.data.award [0].num); this.StartRoll(target); DBUIController.mDBUIInstance.RefreshUserInfo(); } }