public void UpdateUI(RebateDialDto rebateDialDto) { if (rebateDialDto != null) { if (rebateDialDto.position.Count > 0) { isPlayerAni = true; resultIndex = rebateDialDto.position[0] - 1; if (rebateDialInfoDto.canGetCount > 0) { rebateDialInfoDto.canGetCount--; drawCount.text = drawCount.text = "剩余次数(" + rebateDialInfoDto.canGetCount + ")"; rebateDialInfoDto.getCounted++; alreadyTimes.text = rebateDialInfoDto.getCounted.ToString(); } else { drawBtn.interactable = false; } PlayerCache.SetWealthUpdate(rebateDialDto.items, false); StartCoroutine(StartPlayAni(rebateDialDto)); } } }
//GO按钮点击事件 private void GoOnClick() { AudioManager.Instance.PlaySound("button"); //判断是否停止 if (isStop) { //向服务器发送开始旋转请求 SignInDto signInDto = siginOperation.dial(PlayerCache.loginInfo.uid); if (signInDto != null) { BackData(signInDto.indexTemp); PlayerCache.SetWealthUpdate(signInDto.items, false); PlayerCache.loginInfo.isSignInDialAward = true; } } }
/// <summary> /// 点击领取奖励 /// </summary> /// <param name="j"></param> private void BtnGetAward(Button button) { AudioManager.Instance.PlaySound("button"); Text text = button.GetComponentInChildren <Text>(); if (text.text == "立即开始") { //开始任务,调到经典场 选择类型 UIManager.Instance.Clear(); XUIUtils.LoadSceneX((int)SceneType.ClassicZJH); } else if (text.text == "领取") { ItemListDto itemListDto = dbGiftBagOperation.receiveAward(PlayerCache.loginInfo.uid); if (itemListDto != null) { PlayerCache.SetWealthUpdate(itemListDto.items, true); text.text = "已领取"; } } }
/// <summary> /// 购买成功回调 /// </summary> /// <param name="callBackParam"></param> public override void pay2CallBack(ItemListDto callBackParam) { XUIMidMsg.QuickMsg("购买成功!"); PlayerCache.SetWealthUpdate(callBackParam.items, true); }