Files
unity-vr-development/SurvivalIsland/Assets/Scripts/TriggerZone.cs
T
2025-03-13 20:23:55 +08:00

14 lines
238 B
C#

using UnityEngine;
using System.Collections;
public class TriggerZone : MonoBehaviour
{
void OnTriggerEnter(Collider col)
{
if (col.gameObject.tag == "Player")
{
transform.FindChild("door").SendMessage("DoorCheck");
}
}
}