Files
JJBB/Assets/Project/Script/GUI/Other/SystemLogicButton.cs
2024-08-23 15:49:34 +08:00

17 lines
369 B
C#

using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(Button))]
public class SystemLogicButton : MonoBehaviour
{
private void Awake()
{
var button = GetComponent<Button>();
button.onClick.AddListener(OnButtonClick);
}
private static void OnButtonClick()
{
UIManager.ShowUI(UIInfo.SystemAndAutoFight);
}
}