コード例 #1
0
 void OnGuildListForJoin(C2G.GuildListForJoin packet, C2G.GuildListForJoinAck ack)
 {
     if (ack.guild_join_info != null && ack.guild_join_info.Count > 0)
     {
         GuildInfoItemPrefabManager.Clear();
         GuildInfoItem first = null;
         foreach (var guild_info in ack.guild_join_info)
         {
             var item = GuildInfoItemPrefabManager.GetNewObject <GuildInfoItem>(m_GridGuild.transform, Vector3.zero);
             item.Init(new pd_GuildInfoDetail(guild_info.guild_info), OnSelectedGuild);
             if (first == null)
             {
                 first = item;
             }
         }
         m_GridGuild.Reposition();
         m_ScrollGuild.ResetPosition();
         first.OnClickGuild();
     }
     else
     {
         Tooltip.Instance.ShowMessageKey("NotExistJoinableGuild");
         OnClickFilterAll();
     }
     RequestGuilds = ack.request_guilds;
     UpdateRequestCount();
 }
コード例 #2
0
 void OnGuildListForRequest(C2G.GuildListForRequest packet, C2G.GuildListForJoinAck ack)
 {
     m_RequestGuilds = ack.guild_join_info;
     InitGuildList();
 }