using UnityEngine;

public class UIInGame : MonoBehaviour
{
    private void Awake()
    {
        Events.OnGameStart += OnGameStart;
        Events.OnGameEnd += OnGameEnd;
        gameObject.SetActive(false);
    }

    private void OnDestroy()
    {
        Events.OnGameStart -= OnGameStart;
        Events.OnGameEnd -= OnGameEnd;
    }

    private void OnGameStart()
    {
        gameObject.SetActive(true);
    }

    private void OnGameEnd()
    {
        gameObject.SetActive(false);
    }
}
