예제 #1
0
        public List <MetaDataForWidget> GetData(int dataCategory)
        {
            List <MetaDataForWidget> meteDataList = new List <MetaDataForWidget>();

            switch (dataCategory)
            {
            case 0:     //end game rewards test data provider only


                for (int testI = 0; testI < 20; ++testI)
                {
                    MetaDataForWidget testitem = new MetaDataForWidget();
                    testitem.dataStr1 = "wow" + testI.ToString();
                    testitem.dataInt1 = testI;
                    meteDataList.Add(testitem);
                }



                break;

            default:
                break;
            }
            return(meteDataList);
        }
 public void SetData(MetaDataForWidget mdi)
 {
     ItemNameText.text  = mdi.dataStr1;
     ItemCountText.text = mdi.dataInt1.ToString();
     if (mdi.dataImg != null)
     {
         ItemImg = mdi.dataImg;
     }
 }