mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-28 05:14:04 -05:00
Added UI-UX Demo Scene
-Included Toon Shaders -Included Movement and Popup Scripts -Included WallRun Demo -Added Materials
This commit is contained in:
33
Assets/Scripts/PopupController.cs
Normal file
33
Assets/Scripts/PopupController.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user