示例#1
0
    private ClubUnionWidget mRootView;    //父节点

    /// <summary>
    /// 设置数据并显示
    /// </summary>
    /// <param name="data"></param>
    public void SetData(int index, SendGetClubConpanyInfo data, ClubUnionWidget rootView)
    {
        mRootView   = rootView;
        mIndex.text = (index + 1).ToString();
        mData       = data;
        //id
        mId.text = data.cludId;
        //名字
        mName.text = data.clubName;
        //珍珠
        mRichValue.text = data.gold.ToString();
    }
示例#2
0
    /// <summary>
    /// 获取俱乐部联盟列表
    /// </summary>
    /// <param name="clubid"></param>
    public void SendGetClubCompany(string clubid)
    {
        SendGetClubConpanyReq req = new SendGetClubConpanyReq();

        req.clubId = clubid;
        NetProcess.SendRequest <SendGetClubConpanyReq>(req, ProtoIdMap.CMD_SendGetClubCompanys, (msg) =>
        {
            SendGetClubConpanyAck ack = msg.Read <SendGetClubConpanyAck>();
            if (ack.code == 1)
            {
                ClubModel.Inst.ClubUnionInfoData = ack.data.list;
                ClubUnionWidget view             = BaseView.GetWidget <ClubUnionWidget>("Windows/ClubView/ClubUnionWidget", mView.transform);
                view.InitUILabel(ack.data.num);
            }
            else
            {
                GameUtils.ShowErrorTips(ack.code);
            }
        });
    }