Exemplo n.º 1
0
    public static CItemCollectionCellView CreateCollectionCellView()
    {
        if (mObj == null)
        {
            mObj = Resources.Load("pbCItemCollectionCellView");
        }
        GameObject go = Instantiate(mObj) as GameObject;

        CItemCollectionCellView cc = go.GetComponent <CItemCollectionCellView>();

        return(cc);
    }
Exemplo n.º 2
0
    void freshWithThreeCollection(int id1, int id2, int id3, Color color)
    {
        mObjID1 = id1;
        mObjID2 = id2;
        mObjID3 = id3;

        spTitleBackground.color = color;
        WGDataController _dataCtrl = WGDataController.Instance;
        int numleft   = _dataCtrl.GetCollectionOwnNum(id1);
        int numMiddle = _dataCtrl.GetCollectionOwnNum(id2);
        int numRight  = _dataCtrl.GetCollectionOwnNum(id3);

        mCanSellNum = Mathf.Min(numleft, numMiddle, numRight);

        BCCollectionInfo bci = WGDataController.Instance.GetCollectionInfo(id1);

        labGroupName.text = bci.groupdes;
        labGroupNum.text  = mCanSellNum.ToString();

        CItemCollectionCellView leftCell = CItemCollectionCellView.CreateCollectionCellView();

        AddCell(leftCell.gameObject, goLeft);
        leftCell.freshWithCollectionID(id1, color);
        szItemColCell.Add(leftCell);

        CItemCollectionCellView middelCell = CItemCollectionCellView.CreateCollectionCellView();

        AddCell(middelCell.gameObject, goMiddel);
        middelCell.freshWithCollectionID(id2, color);
        szItemColCell.Add(middelCell);

        CItemCollectionCellView rightCell = CItemCollectionCellView.CreateCollectionCellView();

        AddCell(rightCell.gameObject, goRight);
        rightCell.freshWithCollectionID(id3, color);
        szItemColCell.Add(rightCell);
    }