MainUIPanelData.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. using Fort23.Core;
  2. using Fort23.UTool;
  3. using UnityEngine.UI;
  4. using UnityEngine;
  5. using System.Collections.Generic;
  6. using TMPro;
  7. namespace Fort23.Mono
  8. {
  9. public partial class MainUIPanel
  10. {
  11. #region 自定义数据
  12. private List<object> _hero_battle;
  13. public List<object> hero_battle
  14. {
  15. get{
  16. if (_hero_battle == null)
  17. {
  18. _hero_battle = GetUIUnit<List<object>>("hero_battle");
  19. }
  20. return _hero_battle;
  21. }
  22. }
  23. private RectTransform _herobag;
  24. public RectTransform herobag
  25. {
  26. get{
  27. if (_herobag == null)
  28. {
  29. _herobag = GetUIUnit<RectTransform>("herobag");
  30. }
  31. return _herobag;
  32. }
  33. }
  34. private RectTransform _Icon_Coin;
  35. public RectTransform Icon_Coin
  36. {
  37. get{
  38. if (_Icon_Coin == null)
  39. {
  40. _Icon_Coin = GetUIUnit<RectTransform>("Icon_Coin");
  41. }
  42. return _Icon_Coin;
  43. }
  44. }
  45. private RectTransform _expPoint;
  46. public RectTransform expPoint
  47. {
  48. get{
  49. if (_expPoint == null)
  50. {
  51. _expPoint = GetUIUnit<RectTransform>("expPoint");
  52. }
  53. return _expPoint;
  54. }
  55. }
  56. private Slider _exp;
  57. public Slider exp
  58. {
  59. get{
  60. if (_exp == null)
  61. {
  62. _exp = GetUIUnit<Slider>("exp");
  63. }
  64. return _exp;
  65. }
  66. }
  67. private TextMeshProUGUI _TextExp;
  68. public TextMeshProUGUI TextExp
  69. {
  70. get{
  71. if (_TextExp == null)
  72. {
  73. _TextExp = GetUIUnit<TextMeshProUGUI>("TextExp");
  74. }
  75. return _TextExp;
  76. }
  77. }
  78. private TextMeshProUGUI _coinText;
  79. public TextMeshProUGUI coinText
  80. {
  81. get{
  82. if (_coinText == null)
  83. {
  84. _coinText = GetUIUnit<TextMeshProUGUI>("coinText");
  85. }
  86. return _coinText;
  87. }
  88. }
  89. #endregion 自定义数据结束
  90. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  91. {
  92. await base.SetUIGameObject(gObjectPoolInterface);
  93. Init();
  94. }
  95. }
  96. }