Example #1
0
    //////////////////////////////////////////////////////////////////////////
    void OnGuildListRank(C2G.GuildListRank packet, C2G.GuildListRankAck ack)
    {
        m_Total = ack.total;
        if (ack.guild_infos != null && ack.guild_infos.Count > 0)
        {
            GuildInfoItemPrefabManager.Clear();
            GuildInfoItem first = null;
            foreach (var guild_info in ack.guild_infos)
            {
                var item = GuildInfoItemPrefabManager.GetNewObject <GuildInfoItem>(m_GridGuild.transform, Vector3.zero);
                item.Init(new pd_GuildInfoDetail(guild_info), OnSelectedGuild);
                if (first == null)
                {
                    first = item;
                }
            }
            m_GridGuild.Reposition();
            m_ScrollGuild.ResetPosition();

            first.OnClickGuild();
        }
    }
Example #2
0
 void GetGuildListForRank()
 {
     C2G.GuildListRank packet = new C2G.GuildListRank();
     packet.page = m_Page;
     Network.GameServer.JsonAsync <C2G.GuildListRank, C2G.GuildListRankAck>(packet, OnGuildListRank);
 }