123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using Fort23.Core;
- using Fort23.UTool;
- using UnityEngine.UI;
- using UnityEngine;
- using System.Collections.Generic;
- namespace Fort23.Mono
- {
- public partial class HeroHpWidget
- {
- #region 自定义数据
- private MyImage _hp;
- public MyImage hp
- {
- get{
- if (_hp == null)
- {
- _hp = GetUIUnit<MyImage>("hp");
- }
- return _hp;
- }
- }
- private GameObject _jy;
- public GameObject jy
- {
- get{
- if (_jy == null)
- {
- _jy = GetUIUnit<GameObject>("jy");
- }
- return _jy;
- }
- }
- private RectTransform _bg;
- public RectTransform bg
- {
- get{
- if (_bg == null)
- {
- _bg = GetUIUnit<RectTransform>("bg");
- }
- return _bg;
- }
- }
- #endregion 自定义数据结束
- public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
- {
- await base.SetUIGameObject(gObjectPoolInterface);
- Init();
- }
- }
- }
|