using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace LoyalSoftSDK { public class PayItemPanel : MonoBehaviour { private Text productName; private Text orderId; private Text time; private Text amount; private Text status; // Use this for initialization public void SetInfo(string _productName, string _orderId, string _time, string _amount) { productName = this.transform.Find("ProductName").gameObject.GetComponent(); orderId = this.transform.Find("OrderId").gameObject.GetComponent(); time = this.transform.Find("Time").gameObject.GetComponent(); amount = this.transform.Find("Amount").gameObject.GetComponent(); status = this.transform.Find("Status").gameObject.GetComponent(); status.text = "已完成"; productName.text = _productName; orderId.text = _orderId; time.text = _time; float amt = float.Parse(_amount)/100; amount.text = amt.ToString("F2") + "元"; } } }