WXGame/box1/Assets/Script/UI/LosePanel.cs

44 lines
796 B
C#
Raw Normal View History

2024-11-08 18:21:41 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LosePanel : MonoBehaviour
{
[SerializeField] private Button nextButton;
[SerializeField] private Button closeButton;
// Start is called before the first frame update
void Start()
{
}
private void OnEnable()
{
nextButton.onClick.AddListener(NextEvent);
closeButton.onClick.AddListener(CloseEvent);
}
// Update is called once per frame
void Update()
{
}
private void OnDisable()
{
nextButton.onClick.RemoveListener(NextEvent);
closeButton.onClick.RemoveListener(CloseEvent);
}
void NextEvent()
{
}
void CloseEvent()
{
}
}