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(); txtTo = transform.Find("txtTo").GetComponent(); } 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"); } }