revival/game/Assets/Scripts/Artefacts/PickUpDisplay.cs

32 lines
693 B
C#
Raw Normal View History

2021-03-01 19:09:21 +01:00
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;
}
}