private void OnTriggerExit(Collider other) { if (TriggerList.Contains(other.gameObject)) { TriggerList.Remove(other.gameObject); } }
public void RemoveTriggerRecord(TriggerRecord trigger) { if (TriggerList == null) { return; } TriggerList.Remove(trigger); //remove from TriggerSystem long nowTick = DateTime.Now.Ticks; double interval = (nowTick - _lastStepTick) / TimeSpan.TicksPerMillisecond; if (interval < 50) { ((TriggerSystem)_currentView.MainTriggerSystem).UnregisterTrigger(trigger); } }