TheKingsRace/Assets/Scripts/PopupController.cs
wheatv3015 b2bdf4c871 Added UI-UX Demo Scene
-Included Toon Shaders
-Included Movement and Popup Scripts
-Included WallRun Demo
-Added Materials
2021-09-29 11:36:53 -05:00

34 lines
665 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PopupController : MonoBehaviour
{
public Text 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.gameObject.activeInHierarchy)
{
Popup.gameObject.SetActive(false);
} else
{
Popup.gameObject.SetActive(true);
}
}
}
}