You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1.3 KiB

using IVDataFormat;
using TMPro;
public class IVPpItemUseTo : IVPpItemUse
{
protected GoodsItem goodsItemTo;
protected TextMeshProUGUI txtTo;
public override void Init()
{
base.Init();
goodsItemTo = transform.Find("GoodsItemTo").GetComponent<GoodsItem>();
txtTo = transform.Find("txtTo").GetComponent<TextMeshProUGUI>();
}
public void Open(nGoods goodsuse, nGoods goodsto, System.Action actionsub, System.Action actionadd, System.Action actionmin, System.Action actionmax,
System.Action actionyes, System.Action actionno, string strtitle, string stryes, string strno)
{
if (string.IsNullOrEmpty(strtitle))
strtitle = LocalizationText.GetText(Global.STR_USE);
if (string.IsNullOrEmpty(stryes))
stryes = LocalizationText.GetText(Global.STR_USE);
if (string.IsNullOrEmpty(strno))
strno = LocalizationText.GetText(Global.STR_CANCEL);
goodsItemTo.SetData(goodsto);
Open(goodsuse, actionsub, actionadd, actionmin, actionmax, actionyes, actionno, strtitle, stryes, strno);
}
public void SetCount(int icount, int iuse, int ito)
{
txtCount.text = icount.ToString();
txtUse.text = iuse.ToString("-0");
txtTo.text = ito.ToString("+0");
}
}