32 lines
693 B
C#
32 lines
693 B
C#
|
using Ktyl.Util;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class PickUpDisplay : MonoBehaviour
|
||
|
{
|
||
|
public bool paused => _paused;
|
||
|
[SerializeField] private static bool _paused;
|
||
|
|
||
|
[SerializeField] private GameObject artefactUI;
|
||
|
[SerializeField] private SerialInt nearbyArtefactID;
|
||
|
|
||
|
private void Start()
|
||
|
{
|
||
|
EventHandler.current.onArtefactUI += PopUpOn;
|
||
|
}
|
||
|
public void PopUpOn()
|
||
|
{
|
||
|
_paused = true;
|
||
|
artefactUI.SetActive(true);
|
||
|
Time.timeScale = 0.0f;
|
||
|
}
|
||
|
|
||
|
public void PopUpOff()
|
||
|
{
|
||
|
_paused = false;
|
||
|
artefactUI.SetActive(false);
|
||
|
Time.timeScale = 1.0f;
|
||
|
}
|
||
|
}
|