mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-03-22 09:44:15 -05:00
-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
34 lines
638 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|