TheKingsRace/Assets/Scripts/PopupController.cs
Vincent Wheat 84a8d5134c Script Cleanup
Cleaned up popup controller
2021-11-05 13:19:24 -05:00

23 lines
476 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PopupController : MonoBehaviour
{
public GameObject Popup;
private void OnTriggerEnter(Collider other)
{
if( other.tag == "Player")
{
if (Popup.activeInHierarchy)
{
Popup.SetActive(false);
} else
{
Popup.SetActive(true);
}
}
}
}