1234567891011121314151617181920212223242526 |
- using UnityEngine;
- using System.Collections;
- public class BuyLabel : MonoBehaviour
- {
- public StoreProductId productId;
- UILabel label;
- void Awake()
- {
- label = GetComponent<UILabel>();
- }
- void OnEnable()
- {
- IAPProduct product = StoreManager.Instance.GetProduct(productId);
- if (product != null)
- {
- label.text = string.Format(Localization.instance.Get("button.label.buyProduct"), product.currencyCode+product.price);
- } else
- {
- label.text = Localization.instance.Get("button.label.buyProductNoPrice");
- }
- }
- }
|