using System.Collections; using System.Collections.Generic; using UnityEngine; public class StandpointController : PermanentTriggerBase { public bool isStaying = false; // Start is called before the first frame update //void Start() //{ //} // Update is called once per frame //void Update() //{ //} void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { Debug.Log("进入侧面开门点"); isStaying = true; } } void OnTriggerExit(Collider other) { if (other.gameObject.tag == "Player") { Debug.Log("停留在侧面开门点"); isStaying = false; } } void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player") { Debug.Log("离开侧面开门点"); isStaying = true; } } }