ReadyView.cs 884 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class ReadyView : PinBallUIBase
  6. {
  7. public Text hintText;
  8. protected override void Init()
  9. {
  10. base.Init();
  11. uILevel = PinBallUILevel.Pop;
  12. hintText = transform.Find("Text").GetComponent<Text>();
  13. }
  14. protected override void ShowUIOpt(object[] args)
  15. {
  16. int num = (int)args[0];
  17. hintText.text = num.ToString();
  18. if (num >= 3)
  19. {
  20. hintText.color = Color.red;
  21. }
  22. else if(num == 2)
  23. {
  24. //hintText.color = Color.yellow;
  25. hintText.color = Color.red;
  26. }
  27. else if (num == 1)
  28. {
  29. //hintText.color = Color.green;
  30. hintText.color = Color.red;
  31. }
  32. }
  33. protected override void HideUIOpt()
  34. {
  35. }
  36. }