33 lines
632 B
C#
33 lines
632 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class SetBoxCollider : MonoBehaviour
|
|
{
|
|
|
|
public GameObject Tips;
|
|
|
|
private void OnTriggerStay(Collider other)
|
|
{
|
|
if (other.tag == "Player")
|
|
{
|
|
Tips.SetActive(true);
|
|
}
|
|
}
|
|
//private void OnTriggerEnter(Collider other)
|
|
//{
|
|
// if (other.tag == "Player")
|
|
// {
|
|
// Tips.SetActive(true);
|
|
// }
|
|
//}
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
if (other.tag == "Player")
|
|
{
|
|
Tips.SetActive(false);
|
|
}
|
|
}
|
|
}
|