Exemplo n.º 1
0
    /// <summary>
    /// 刷新item
    /// </summary>
    /// <param name="args"></param>
    private void OnUpdateItem(params object[] args)
    {
        int                    index = (int)args[0];
        GameObject             obj   = args[1] as GameObject;
        SendGetClubConpanyInfo data  = ClubModel.Inst.ClubUnionInfoData[index];

        obj.SetActive(true);
        obj.GetComponent <ClubOneUnionWidget>().SetData(index, data, this);
    }
Exemplo n.º 2
0
    /// <summary>
    /// 初始化item
    /// </summary>
    /// <param name="args"></param>
    private void OnInitItem(params object[] args)
    {
        int index = (int)args[0];
        SendGetClubConpanyInfo data = ClubModel.Inst.ClubUnionInfoData[index];
        GameObject             obj  = NGUITools.AddChild(mScroll.gameObject, mItem);

        obj.SetActive(true);
        obj.GetComponent <ClubOneUnionWidget>().SetData(index, data, this);
        mScroll.InitItem(index, obj);
    }
Exemplo n.º 3
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();
    }