コード例 #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
    public void OnClickFilterJoinable()
    {
        m_PageIndicator.SetActive(false);
        m_PanelFilter.SetActive(false);
        m_LabelFilter.text = Localization.Get("GuildJoinable");

        C2G.GuildListForJoin packet = new C2G.GuildListForJoin();
        packet.player_level = Network.PlayerInfo.player_level;
        Network.GameServer.JsonAsync <C2G.GuildListForJoin, C2G.GuildListForJoinAck>(packet, OnGuildListForJoin);
    }