public override void Release(bool depthRelease = true) { base.Release(depthRelease); if (m_rewardData != null) { m_rewardData = null; } if (m_priceAsynSeed != null) { m_priceAsynSeed.Release(true); m_priceAsynSeed = null; } if (m_priceAsynSeed2 != null) { m_priceAsynSeed2.Release(true); m_priceAsynSeed2 = null; } }
public override void SetGridData(object data) { base.SetGridData(data); if (data is RewardFindData) { m_rewardData = (RewardFindData)data; RewardFindID = m_rewardData.id; if (titleName != null) { DailyDataBase daily = GameTableManager.Instance.GetTableItem <DailyDataBase>(m_rewardData.id); if (daily != null) { titleName.text = daily.name; } } if (leftTime != null) { leftTime.text = m_rewardData.left_time.ToString(); } SetButtonState(); RefreshItems(); SetMoneyContent(); } }
void OnUpdateList(object obj, ValueUpdateEventArgs value) { if (value.key.Equals("OnUpdateList")) { m_lstWelFareData.Sort(); if (m_ctor_OtherScrollView != null) { m_ctor_OtherScrollView.CreateGrids(m_lstWelFareData.Count); m_ctor_ToggleScrollView.UpdateActiveGridData(); } } else if (value.key.Equals("OnUpdateInviteList")) { //m_lstWelFareData = m_dataManager.GetWelfareDatasBy2Type(WelfareType.FriendInvite, curInviteType); m_lstWelFareData.Sort(); if (m_ctor_FriendInviteScroll != null) { m_ctor_FriendInviteScroll.CreateGrids(m_lstWelFareData.Count); m_ctor_ToggleScrollView.UpdateActiveGridData(); } } else if (value.key.Equals("OnUpdateMonth")) { if (m_ctor_CheckInScrollView != null) { List <UIWelfareCheckGrid> grids = m_ctor_CheckInScrollView.GetGrids <UIWelfareCheckGrid>(); for (int i = 0; i < grids.Count; i++) { grids[i].RefreshSigne(); } } CheckEnableSignBtn(); } else if (value.key.Equals("OnUpdateSingleRewardFind")) { m_lstRewardFindData.Sort(); if (m_ctor_RewardFindScroll != null) { List <UIRewardFindGrid> grids = m_ctor_RewardFindScroll.GetGrids <UIRewardFindGrid>(); for (int i = 0; i < grids.Count; i++) { RewardFindData data = (RewardFindData)value.newValue; if (data == null) { Engine.Utility.Log.Error("data == null"); return; } if (grids[i].RewardFindID == data.id) { grids[i].SetGridData(data); } } } } else if (value.key.Equals("OnUpdateAllRewardFind")) { m_lstRewardFindData.Sort(); if (m_ctor_RewardFindScroll != null) { m_ctor_RewardFindScroll.CreateGrids(m_lstRewardFindData.Count); } } else if (value.key.Equals("OnUpdateCollectWord")) { m_lstWelFareData = m_dataManager.GetWelfareDatasByType(WelfareType.CollectWord); m_lstWelFareData.Sort(); if (m_ctor_CollectWordScrollView != null) { m_ctor_CollectWordScrollView.CreateGrids(m_lstWelFareData.Count); } if (m_ctor_ToggleScrollView != null) { m_ctor_ToggleScrollView.UpdateActiveGridData(); } } else if (value.key.Equals("OnHideAllRewardFind")) { m_trans_NullRewardTipsContent.gameObject.SetActive(true); m_ctor_RewardFindScroll.SetVisible(false); if (m_ctor_ToggleScrollView != null) { m_ctor_ToggleScrollView.UpdateActiveGridData(); } } else if (value.key.Equals("OnUpdateBindPhone")) { RefreshBindBtns(); m_ctor_ToggleScrollView.UpdateActiveGridData(); } else if (value.key.Equals("OnChangeInviteState")) { ChangeInviteState(); m_lstWelFareData.Sort(); if (m_ctor_FriendInviteScroll != null) { m_ctor_FriendInviteScroll.CreateGrids(m_lstWelFareData.Count); m_ctor_ToggleScrollView.UpdateActiveGridData(); } } else if (value.key.Equals("OnUpdateRushLevel")) { m_lstWelFareData.Sort(); if (m_ctor_OtherScrollView != null) { m_ctor_OtherScrollView.CreateGrids(m_lstWelFareData.Count); } if (m_ctor_ToggleScrollView != null) { m_ctor_ToggleScrollView.UpdateActiveGridData(); } } else if (value.key.Equals("RecieveInvitedPlayerData")) { m_lstWelFareData = m_dataManager.GetWelfareDatasBy2Type(WelfareType.FriendInvite, curInviteType); m_lstWelFareData.Sort(); if (m_ctor_FriendInviteScroll != null) { m_ctor_FriendInviteScroll.CreateGrids(m_lstWelFareData.Count); m_ctor_ToggleScrollView.UpdateActiveGridData(); } } }