1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class PowerOffPanel : MonoBehaviour
- {
- /// <summary>
- /// 确定按钮
- /// </summary>
- [SerializeField]
- private Button m_ConfirmBtn;
- /// <summary>
- /// 取消按钮
- /// </summary>
- [SerializeField]
- private Button m_CancelBtn;
-
- [SerializeField]
- private GameObject m_GasPathPanel;
- public void OnBtnClickEvent(string _btnName)
- {
- switch (_btnName)
- {
- case "ConfirmBtn":
- OnConfirmBtnClick();
- break;
- case "CancelBtn":
- OnCancelBtnClick();
- break;
- }
- }
-
- /// <summary>
- /// 确认按钮
- /// </summary>
- private void OnConfirmBtnClick()
- {
- m_GasPathPanel?.SetActive(true);
- this.gameObject.SetActive(false);
- }
- /// <summary>
- /// 取消按钮
- /// </summary>
- private void OnCancelBtnClick()
- {
- this.gameObject.SetActive(false);
- }
- }
|