using UnityEngine; /// /// 拿取地线 /// public class TakeOutLine : MonoBehaviour { public OneValueSyncObject isTake; public void OnTriggerExit(Collider other) { if (other.name.Equals("GroundLine")) { isTake.mybool = true; isTake.SendSync(); if (isTake.action_apprisedetail != null) { isTake.action_apprisedetail.Invoke(); } } } public void OnTriggerStay(Collider other) { if (other.name.Equals("GroundLine") && isTake.mybool) { isTake.mybool = false; isTake.SendSync(); if (isTake.action_apprisedetail != null) { isTake.action_apprisedetail.Invoke(); } } } }