Exemplo n.º 1
0
    /// <summary>
    /// 创建选项卡Grid
    /// </summary>
    /// <param name="data"></param>
    public void GenerateRankingTabList(List <int> sortTabIDList)
    {
        if (RankingUILogicManager.Instance == null)
        {
            return;
        }

        m_sortTabIDList = sortTabIDList;
        m_tabMogoListImproved.SetGridLayout <RankingUITabGrid>(m_sortTabIDList.Count, m_tranRankingUITabList.transform, RankingTabListResourceLoaded);
    }
    /// <summary>
    /// 创建限时活动详细Grid
    /// </summary>
    /// <param name="data"></param>
    private void GenerateLimitActivityInfoList(Action action = null)
    {
        m_infoGridListMogoListImproved.SetGridLayout <TimeLimitActivityInfo>(m_listLimitActivityInfoData.Count, m_tranTimeLimitActivityInfoGridList.transform, () =>
        {
            LimitActivityInfoListResourceLoaded();

            if (action != null)
            {
                action();
            }
        });
    }
Exemplo n.º 3
0
 public void Show(bool IsShow)
 {
     if (IsShow)
     {
         byte vipLevel = (byte)(MogoWorld.thePlayer.VipLevel);
         int  curCount = PrivilegeData.dataMap[vipLevel].iconList.Count;
         m_listImproveVIPInfo.SetGridLayout <VIPInfoGrid>(curCount, m_vipInfo.transform, ResourceLoaded);
         if (PrivilegeData.dataMap.ContainsKey(vipLevel + 1))
         {
             int nextCount = PrivilegeData.dataMap[vipLevel + 1].iconList.Count;
             m_listImproveVIPInfoNext.SetGridLayout <VIPInfoGrid>(nextCount, m_vipInfoNext.transform, ResourceLoadedNext);
         }
     }
 }
Exemplo n.º 4
0
    List <PlayerRankData> m_playerRankDataList = new List <PlayerRankData>();// 玩家排行榜各榜单数据列表

    /// <summary>
    /// 创建玩家各榜单排名Grid
    /// </summary>
    /// <param name="data"></param>
    public void GeneratePlayerRankDataList(List <int> rankNumList)
    {
        Dictionary <int, int> m_rankNumMap = new Dictionary <int, int>();// 排行榜ID->排名

        // 服务器返回的玩家排行榜排名是按照xml表顺序的,未经排序,故此处应按priority排序
        int i = 0;

        foreach (int rankID in RankData.dataMap.Keys)
        {
            if (i < rankNumList.Count)
            {
                m_rankNumMap[rankID] = rankNumList[i];
                i++;
            }
            else
            {
                break;
            }
        }

        m_playerRankDataList.Clear();
        for (int rankIndex = 0; rankIndex < m_sortTabIDList.Count; rankIndex++)
        {
            RankData xmlRankData = RankData.GetRankDataByID(m_sortTabIDList[rankIndex]);
            if (xmlRankData != null)
            {
                PlayerRankData playerRankData;
                playerRankData.rankName = LanguageData.GetContent(xmlRankData.name);
                if (m_rankNumMap.ContainsKey(m_sortTabIDList[rankIndex]))
                {
                    playerRankData.rankNum = m_rankNumMap[m_sortTabIDList[rankIndex]];
                }
                else
                {
                    playerRankData.rankNum = 0;
                }

                m_playerRankDataList.Add(playerRankData);
            }
        }

        m_playerRankDataMogoListImproved.SetGridLayout <RankingUIPlayerRankData>(m_playerRankDataList.Count, m_tranRankingUIPlayerRankDataList.transform, PlayerRankDataListResourceLoaded);
    }
Exemplo n.º 5
0
    /// <summary>
    /// 创建排名数据Grid
    /// </summary>
    /// <param name="data"></param>
    public void GenerateRankingMainDataList(List <RankingMainData> rankingMainDataList, bool hasData)
    {
        m_rankingMainDataList = rankingMainDataList;

        // 按照排名进行排序
        m_rankingMainDataList.Sort(delegate(RankingMainData a, RankingMainData b)
        {
            if (a.uniqieRank < b.uniqieRank)
            {
                return(-1);
            }
            else
            {
                return(1);
            }
        });

        m_mainRankDataMogoListImproved.SetGridLayout <RankingUIRankData>(m_rankingMainDataList.Count, m_tranRankingUIMainRankDataList.transform, RankingMainDataListResourceLoaded);
        SetMainRankDataArrow(rankingMainDataList.Count, hasData);
    }