22 lines
533 B
C#
22 lines
533 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
public class TRigger_1 : MonoBehaviour
|
|
{
|
|
public GameObject obj1;
|
|
private void Start()
|
|
{
|
|
obj1.SetActive(false);
|
|
}
|
|
// Start is called before the first frame update
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
obj1.SetActive(true);
|
|
transform.parent.parent.SendMessage("Audio_gfb");
|
|
}
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
obj1.SetActive(false);
|
|
}
|
|
} |