using System; using TMPro; using UnityEngine; using UnityEngine.UI; namespace HotUpdate.UI { /// /// UI_MainHUD 运行时绑定。 /// public sealed class MainHudView : MonoBehaviour { public const string PrefabName = "UI_MainHUD"; TextMeshProUGUI _status; TextMeshProUGUI _pid; GameObject _reconnectPanel; TextMeshProUGUI _reconnectText; Button _reconnectBtn; public event Action OnReconnectClicked; public void Bind() { _status = FindTmp("Txt_Status"); _pid = FindTmp("Txt_Pid"); var panel = transform.Find("Panel_Reconnect"); _reconnectPanel = panel != null ? panel.gameObject : null; _reconnectText = FindTmp("Txt_Reconnect"); var btnTf = transform.Find("Panel_Reconnect/Btn_Reconnect"); _reconnectBtn = btnTf != null ? btnTf.GetComponent