Пример #1
0
 private void OnTriggerExit(Collider other)
 {
     if (TriggerList.Contains(other.gameObject))
     {
         TriggerList.Remove(other.gameObject);
     }
 }
Пример #2
0
        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);
            }
        }