/// <summary> /// 用每组的最后一条数据 生成banner /// </summary> /// <param name="index">活动的key</param> /// <param name="cell"></param> private void UpdateBannerItem(int index, RectTransform cell) { ActivityItem _bannerItemData = cell.GetComponent <ActivityItem>(); if (_bannerItemData == null) { _bannerItemData = cell.gameObject.AddComponent <ActivityItem>(); } _bannerItemData.SetOnClick(SetItemImageLight); List <int> _List = m_MergeData[m_TeamKeyList[index]]; for (int j = 0; j < m_ActivityBannerData.Count; j++) { if (m_ActivityBannerData[j]._ActivityOverviewData.m_id == _List[_List.Count - 1]) { ActivityBannerData temp = m_ActivityBannerData[j]; _bannerItemData.SetActivityDate(temp._ActivityOverviewData, temp.m_Key); GameactivityTemplate _Data = (GameactivityTemplate)DataTemplate.GetInstance().m_GameactivityTable.getTableData(temp._ActivityOverviewData.m_id); if (m_TeamId == _Data.getTeam()) { _bannerItemData.SetImageLight(true); } else { _bannerItemData.SetImageLight(false); } RefreshItem(_bannerItemData, temp._ActivityOverviewData.m_id); } } }