/// <summary> 소탕 보상 아이템 응답 </summary> public void OnPMsgSweepReward(NetData.SweepSlotData slotData) { SweepSlotList.Insert(0, slotData); TempCoroutine.instance.FrameDelay(0.2f, () => { SweepPaging.RefreshSlot(SweepSlotList.Count); SoundManager.instance.PlaySfxSound(eUISfx.UI_reward_popup, false); }); }
/// <summary> 소탕 보상 슬롯 </summary> void OnCallBackSweepSlot(int arr, GameObject go) { if (SweepSlotList.Count <= arr) { go.SetActive(false); return; } NetData.SweepSlotData data = SweepSlotList[arr]; go.SetActive(true); Transform slotTf = go.transform; slotTf.FindChild("title").GetComponent <UILabel>().text = string.Format(_LowDataMgr.instance.GetStringCommon(304), (SweepSlotList.Count - arr)); //data.SweepCount slotTf.FindChild("get_gold").GetComponent <UILabel>().text = string.Format("{0}", data.GetGold == 0 ? "0" : data.GetGold.ToString()); //ToString("#,##")); slotTf.FindChild("get_exp").GetComponent <UILabel>().text = string.Format("{0}", data.GetExp == 0 ? "0" : data.GetExp.ToString()); //ToString("#,##")); for (int i = 0; i < 4; i++) { Transform itemRoot = slotTf.FindChild(string.Format("ItemRoot_{0}", i)); if (itemRoot == null) { continue; } if (data.DropList.Count <= i) { itemRoot.gameObject.SetActive(false); continue; } NetData.DropItemData dropData = data.DropList[i]; itemRoot.gameObject.SetActive(true); InvenItemSlotObject inven = itemRoot.GetChild(0).GetComponent <InvenItemSlotObject>(); inven.SetLowDataItemSlot(dropData.LowDataId, dropData.Amount); } for (int i = 0; i < 2; i++) { Transform itemRoot = slotTf.FindChild(string.Format("CardItemRoot_{0}", i)); if (itemRoot == null) { continue; } if (data.CardList.Count <= i) { itemRoot.gameObject.SetActive(false); continue; } NetData.DropItemData dropData = data.CardList[i]; itemRoot.gameObject.SetActive(true); InvenItemSlotObject inven = itemRoot.GetChild(0).GetComponent <InvenItemSlotObject>(); inven.SetLowDataItemSlot(dropData.LowDataId, dropData.Amount); } }
/// <summary> 소탕 보상 응답 </summary> public void OnPMsgSweepReward(NetData.SweepSlotData slotData) { StagePopup.OnPMsgSweepReward(slotData); }