TheKingsRace/Assets/Scripts/PopupController.cs
wheatv3015 572d24dd4b Hint Popup Prototype Development
-Added several fonts to guide direction of UI font choice
-Added UI folder in assets
-Added ideas for backgrounds for hint popups
-Updated popup script to be more general for toggling game objects/UI containers
2021-10-01 11:35:51 -05:00

34 lines
638 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PopupController : MonoBehaviour
{
public GameObject Popup;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter(Collider other)
{
if( other.tag == "Player")
{
if (Popup.activeInHierarchy)
{
Popup.SetActive(false);
} else
{
Popup.SetActive(true);
}
}
}
}