예제 #1
0
 private void OnWarInfoGridUIEvent(UIEventType eventType, object data, object param)
 {
     if (eventType == UIEventType.Click)
     {
         UICityWarMemberInfoGrid grid = data as UICityWarMemberInfoGrid;
         if (grid == null)
         {
             return;
         }
     }
 }
예제 #2
0
    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);
                }
            }
        }
    }