Files
2026-05-04 22:36:24 +03:00

27 lines
589 B
C#

using Code.GameplayServices;
using UnityEngine;
using UnityEngine.UI;
namespace Code.UI
{
public class StartGamePanel : MonoBehaviour
{
[SerializeField] private Button startGameButton;
private void Awake()
{
startGameButton.onClick.AddListener(RestartGame);
}
private void RestartGame()
{
GameplayManager.Instance.RestartGame();
gameObject.SetActive(false);
}
private void OnDestroy()
{
startGameButton.onClick.RemoveListener(RestartGame);
}
}
}