//纯展示 private void OnInitResultData(ResultWindowData data) { int count = data.m_itemDatas.Count; m_Grid.EnsureSize <GiftContent>(count); for (int i = 0; i < count; i++) { GiftContent giftContent = m_Grid.GetChild <GiftContent>(i); giftContent.SetData(data.m_itemDatas[i]); giftContent.SetTargetTransform(this.m_bagTrans); giftContent.Visible = true; } }
private void Toggle_Click(EState targetState) { if (state != targetState) { state = targetState; } PayContent.SetActive(state == EState.Pay); GiftContent.SetActive(state == EState.Gift); EquipContent.SetActive(state == EState.Equip); PropContent.SetActive(state == EState.Prop); Refresh(); }
private void OnClick(GameObject obj) { if (this.m_isClick) { return; } this.m_isClick = true; EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, EngineCommonAudioKey.Button_Click_Common.ToString()); for (int i = 0; i < m_Grid.ChildCount; i++) { GiftContent giftcontent = m_Grid.GetChild <GiftContent>(i); giftcontent.PlayTweener(); } TimeModule.Instance.SetTimeout(() => { EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.prop_into_bag.ToString()); EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_GIFTRESULT); GameEvents.PlayerEvents.OnExpChanged.SafeInvoke(null, m_exp); }, 1f); }
private void OnInitData(List <DropInfo> DropInfos) { m_exp = 0; int count = DropInfos.Count; m_Grid.EnsureSize <GiftContent>(count); for (int i = 0; i < count; i++) { GiftContent giftContent = m_Grid.GetChild <GiftContent>(i); giftContent.SetData(DropInfos[i]); giftContent.SetTargetTransform(this.m_bagTrans); giftContent.Visible = true; ConfProp prop = ConfProp.Get(DropInfos[i].PropId); //TODO: 放在各自系统增减装备。 //if ((int)PROP_TYPE.E_FUNC == prop.type || (int)PROP_TYPE.E_CHIP == prop.type || (int)PROP_TYPE.E_NROMAL == prop.type || (int)PROP_TYPE.E_ENERGE == prop.type) //{ // GlobalInfo.MY_PLAYER_INFO.AddSingleBagInfo(DropInfos[i].PropId, DropInfos[i].Count); //} m_exp += CommonHelper.GetPropExp(DropInfos[i].PropId, DropInfos[i].Count); } }