Example #1
0
        public override void Init(Shop_TableItem res)
        {
            base.Init(res);
            int purchaseId = res.type_param;

            if (!PurchaseMgr.singleton.GetProductInfo(purchaseId, out purchaseProductData))
            {
                gameObject.SetActive(false);
                return;
            }
            RefreshUIData();
        }
Example #2
0
 public virtual void Init(Shop_TableItem res)
 {
     if (res == this.res)
     {
         return;
     }
     this.res = res;
     if (!string.IsNullOrEmpty(res.bgIcon))
     {
         bgIconImg.sprite = Global.gApp.gResMgr.LoadAssets <Sprite>(res.bgIcon);
     }
     if (!string.IsNullOrEmpty(res.bgEf))
     {
         bgEfObj = Global.gApp.gResMgr.InstantiateObj(res.bgEf);
         bgEfObj.transform.SetParent(transform, false);
     }
 }
Example #3
0
 protected virtual bool IsValid(Shop_TableItem res)
 {
     return(!ShopMgr.singleton.IsSellOut(res));
 }
Example #4
0
 public override void Init(Shop_TableItem res)
 {
     base.Init(res);
     RefreshBoxCost();
     RefreshUIData();
 }