41 lines
924 B
C#
41 lines
924 B
C#
using System;
|
|
using Mono.Event;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace UnityTest.ZXL
|
|
{
|
|
public class SureButton : MonoBehaviour
|
|
{
|
|
[SerializeField] private Button _button;
|
|
[SerializeField] private SureButtonType _sureButtonType;
|
|
|
|
public SureButtonType sureButtonType => _sureButtonType;
|
|
|
|
private void Awake()
|
|
{
|
|
_button = GetComponent<Button>();
|
|
_button.onClick.AddListener(Click);
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
_button.onClick.RemoveListener(Click);
|
|
}
|
|
|
|
void Click()
|
|
{
|
|
EventManager.Instance.FireNow(this, new SureButtonEventArgs(this));
|
|
}
|
|
}
|
|
|
|
public enum SureButtonType
|
|
{
|
|
None,
|
|
气瓶燃烧提示面板,
|
|
总结面板,
|
|
再次检查提示面板,
|
|
经确认提示面板,
|
|
二次确认提示面板,
|
|
}
|
|
} |