ButtonBuyVIP.cs 451 B

12345678910111213141516171819202122232425262728293031
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using System.Collections;
  4. public class ButtonBuyVIP : MonoBehaviour
  5. {
  6. public Text priceText;
  7. public string defaultPrice;
  8. // Use this for initialization
  9. void Start ()
  10. {
  11. //setBought(true);
  12. }
  13. public void setBought(bool value)
  14. {
  15. GetComponent<Button>().interactable = !value;
  16. if(value)
  17. {
  18. priceText.text = Language.GetStr("bought");
  19. }
  20. else
  21. {
  22. priceText.text = defaultPrice;
  23. }
  24. }
  25. }