コード例 #1
0
 public void OpenPanel(BagGoodsItem item)
 {
     _item = item;
     gameObject.SetActive(true);
     title.text = "充值卡选择";
     selectPanel.SetActive(true);
     goodsPanel.SetActive(false);
 }
コード例 #2
0
 private void CreateGoods()
 {
     _node.hintPanel.SetActive(dataList.Count < 1);
     for (int i = 0; i < dataList.Count; i++)
     {
         BagGoodsItem item = Instantiate(prefab, content);
         item._panle = this;
         item.Init(dataList[i]);
         itemList.Add(item);
     }
 }
コード例 #3
0
 /// <summary>
 /// 显示 0是使用 1是出售
 /// </summary>
 public void ShowPanel(BagGoodsItem item)
 {
     _Item = item;
     gameObject.SetActive(true);
     input.text     = useNum.ToString();
     showItem.text  = _Item._data.name;
     haveNum.text   = string.Format("拥有数量:" + _Item._data.counts);
     goodsName.text = _Item._data.goodsType;
     cost.text      = _Item._data.sale_price.ToString();
     allCost.text   = (_Item._data.sale_price * useNum).ToString();
 }