WXGame/box1/Assets/Script/UI/StartPanel.cs
2024-11-08 18:21:41 +08:00

37 lines
652 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class StartPanel : MonoBehaviour
{
[SerializeField] private Button _startButton;
// Start is called before the first frame update
void Start()
{
}
private void OnEnable()
{
_startButton.onClick.AddListener(ButtonEvent);
}
// Update is called once per frame
void Update()
{
}
private void OnDisable()
{
_startButton.onClick.RemoveListener(ButtonEvent);
}
void ButtonEvent()
{
MainPanel.ins.OpenLevelPanel();
}
}