WXGame/box1/Assets/Script/UI/StartPanel.cs
2024-11-26 15:44:50 +08:00

38 lines
702 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();
GameManager.ins.soundSystem.EventAudio();
}
}