UIBloodPalaceScoreboardColumeController.cs 822 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using UnityEngine;
  3. public class UIBloodPalaceScoreboardColumeController : MonoBehaviour
  4. {
  5. public int Time
  6. {
  7. set
  8. {
  9. TimeSpan timeSpan = new TimeSpan(0, 0, value);
  10. this._time.text = string.Format("{0:F0}:{1:D2}", timeSpan.TotalMinutes, timeSpan.Seconds);
  11. }
  12. }
  13. public bool NoHurt
  14. {
  15. set
  16. {
  17. this._noHurt.gameObject.SetActive(value);
  18. }
  19. }
  20. public int Score
  21. {
  22. set
  23. {
  24. this._score.text = value.ToString();
  25. }
  26. }
  27. private void Awake()
  28. {
  29. this._time = base.transform.Find("Time").GetComponent<UILabel>();
  30. this._score = base.transform.Find("Score").GetComponent<UILabel>();
  31. this._noHurt = this._score.transform.Find("NoHurt").GetComponent<UISprite>();
  32. }
  33. private UISprite _noHurt;
  34. private UILabel _score;
  35. private UILabel _time;
  36. }