ButtonOperation.cs 469 B

1234567891011121314151617181920
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class ButtonOperation : MonoBehaviour
  5. {
  6. [SerializeField]
  7. private PowerOffPanel m_PowerOffPanel;
  8. // Start is called before the first frame update
  9. void Start()
  10. {
  11. m_PowerOffPanel = transform.parent.parent.GetComponent<PowerOffPanel>();
  12. }
  13. public void OnBtnClick()
  14. {
  15. m_PowerOffPanel.OnBtnClickEvent(this.gameObject.name);
  16. }
  17. }