コード例 #1
0
 //初始化 item
 public void InitItem()
 {
     UnityEngine.Object obj = WXLLoadPrefab.GetPrefab(WXLPrefabsName.UISecretShopCellItem);
     if (obj != null)
     {
         GameObject       go      = Instantiate(obj) as GameObject;
         UISecretShopCell fc      = go.GetComponent <UISecretShopCell> ();
         Transform        goTrans = go.transform;
         if (SecretShopMgr.GetInstance()._ShopType == 2)
         {
             go.transform.parent = itemRoot.transform;
         }
         else
         {
             go.transform.parent = itemRootBaBa.transform;
         }
         goTrans.localScale         = Vector3.one;
         go.transform.localPosition = Vector3.zero;
         UISecretShopCellList.Add(fc);
         //   fc.Init(id);
         //return fc;
     }
 }
コード例 #2
0
 public void Clear()
 {
     _UISecretShopCell = null;
 }