Files
2026-02-16 17:41:09 +00:00

35 lines
750 B
C#

using UnityEngine;
using TMPro;
public class PopUpManager : MonoBehaviour
{
public static PopUpManager Instance { get; private set; }
[SerializeField] private TMP_Text interactionPopUpText;
bool isPopUpActive = false;
private void Awake()
{
if (Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
}
public void ShowPopUp()
{
isPopUpActive = true;
interactionPopUpText.gameObject.SetActive(true);
}
public void HidePopUp()
{
isPopUpActive = false;
interactionPopUpText.gameObject.SetActive(false);
}
public bool IsPopUpActive()
{
return isPopUpActive;
}
}