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