Пример #1
0
 IEnumerator init(Transform tr)
 {
     foreach (Goods good in Goods.All())
     {
         if (good.Id != _exceptId)
         {
             GameObject  go = UIManager.OpenUI("goodRow", null, tr);
             GoodRowView cv = go.GetComponent <GoodRowView>();
             cv.Id        = good.Id;
             cv.Title     = good.Title;
             cv.ImagePath = "Image/Gift";
             cv.price     = good.Price;
             if (callBack != null)
             {
                 cv.SetCallBack(callBack);
             }
             if (editCallBack != null)
             {
                 cv.setEditCallBack(editCallBack);
             }
             if (deleteCallBack != null)
             {
                 cv.setDeleteCallBack(deleteCallBack);
             }
             yield return(new WaitForEndOfFrame());
         }
     }
 }