43 lines
850 B
C#
43 lines
850 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace BrewMonster
|
|
{
|
|
public class PopupManager : MonoBehaviour
|
|
{
|
|
public static PopupManager Instance { get; private set; }
|
|
|
|
[SerializeField] private GameObject ReviveOptionPopup;
|
|
|
|
private void Awake()
|
|
{
|
|
if (Instance == null)
|
|
{
|
|
Instance = this;
|
|
}
|
|
else
|
|
{
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
if (Instance == this)
|
|
{
|
|
Instance = null;
|
|
}
|
|
}
|
|
|
|
public void OnPlayerDied()
|
|
{
|
|
ReviveOptionPopup.SetActive(true);
|
|
}
|
|
public void OnPlayerRevived()
|
|
{
|
|
ReviveOptionPopup.SetActive(false);
|
|
}
|
|
}
|
|
|
|
}
|