OfflineRewardPanelData.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 OfflineRewardPanel
  10. {
  11. #region 自定义数据
  12. private GameObject _diObj;
  13. public GameObject diObj
  14. {
  15. get{
  16. if (_diObj == null)
  17. {
  18. _diObj = GetUIUnit<GameObject>("diObj");
  19. }
  20. return _diObj;
  21. }
  22. }
  23. private RectTransform _itemRoot;
  24. public RectTransform itemRoot
  25. {
  26. get{
  27. if (_itemRoot == null)
  28. {
  29. _itemRoot = GetUIUnit<RectTransform>("itemRoot");
  30. }
  31. return _itemRoot;
  32. }
  33. }
  34. private GameObject _widget;
  35. public GameObject widget
  36. {
  37. get{
  38. if (_widget == null)
  39. {
  40. _widget = GetUIUnit<GameObject>("widget");
  41. }
  42. return _widget;
  43. }
  44. }
  45. private TextMeshProUGUI _txtOfflineTime;
  46. public TextMeshProUGUI txtOfflineTime
  47. {
  48. get{
  49. if (_txtOfflineTime == null)
  50. {
  51. _txtOfflineTime = GetUIUnit<TextMeshProUGUI>("txtOfflineTime");
  52. }
  53. return _txtOfflineTime;
  54. }
  55. }
  56. private TextMeshProUGUI _txtCoin;
  57. public TextMeshProUGUI txtCoin
  58. {
  59. get{
  60. if (_txtCoin == null)
  61. {
  62. _txtCoin = GetUIUnit<TextMeshProUGUI>("txtCoin");
  63. }
  64. return _txtCoin;
  65. }
  66. }
  67. private TextMeshProUGUI _txtExp;
  68. public TextMeshProUGUI txtExp
  69. {
  70. get{
  71. if (_txtExp == null)
  72. {
  73. _txtExp = GetUIUnit<TextMeshProUGUI>("txtExp");
  74. }
  75. return _txtExp;
  76. }
  77. }
  78. #endregion 自定义数据结束
  79. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  80. {
  81. await base.SetUIGameObject(gObjectPoolInterface);
  82. Init();
  83. }
  84. }
  85. }