private void OnWarInfoGridUIEvent(UIEventType eventType, object data, object param) { if (eventType == UIEventType.Click) { UICityWarMemberInfoGrid grid = data as UICityWarMemberInfoGrid; if (grid == null) { return; } } }
private void OnWarInfoGridDataUpdate(UIGridBase data, int index) { if (null != m_lstCityWarHero && index < m_lstCityWarHero.Count) { UICityWarMemberInfoGrid grid = data as UICityWarMemberInfoGrid; if (grid != null) { grid.SetGridData(m_lstCityWarHero[index]); grid.SetRank(index + 1); //排行 grid.SetName(m_lstCityWarHero[index].name); grid.SetKillNum(m_lstCityWarHero[index].kill_cnt); grid.SetDeathNum(m_lstCityWarHero[index].die_cnt); if (m_cityWarManger.CityWarClanIdList.Contains(m_lstCityWarHero[index].clan_id)) { int clanIndex = m_cityWarManger.CityWarClanIdList.IndexOf(m_lstCityWarHero[index].clan_id); string clanName = clanIndex < m_cityWarManger.CityWarClanNameList.Count ? m_cityWarManger.CityWarClanNameList[clanIndex] : ""; grid.SetClanName(clanName); } } } }