Exemple #1
0
        public void FillItem(object data)
        {
            _data = data as GoodsData;

            this.SetIcon();
            this.SetName();
            this.SetBallsNum();
            this.SetStatus();
            this.RetistBtnEvent();
            Debug.Log("Index" + _data.index);
        }
Exemple #2
0
        private List <List <GoodsData> > GetTestDatas()
        {
            var datas = new List <List <GoodsData> >(5);
            int index = 0;

            for (int i = 0; i < 5; i++)
            {
                //temp.Clear();
                var temp = new List <GoodsData>(2);
                for (int j = 0; j < 2; j++)
                {
                    GoodsData data = new GoodsData();
                    data.GoodsName = string.Format("Goods_{0}", index);
                    Debug.Log(data.GoodsName);
                    data.RemainNum = 10;
                    data.index     = index;
                    temp.Add(data);
                    index++;
                }
                datas.Add(temp);
            }
            return(datas);
        }