예제 #1
0
 public override void OnTriggerExit(RangeObjectPhysicsTriggerInfo PhysicsTriggerInfo)
 {
     if (OnTriggerExitAction != null)
     {
         OnTriggerExitAction.Invoke(PhysicsTriggerInfo.OtherInteractiveObject);
     }
 }
예제 #2
0
 protected override void OnTriggerExitSuccess(RangeObjectPhysicsTriggerInfo RangeObjectPhysicsTriggerInfo)
 {
     if (OnTriggerExitSuccessAction != null)
     {
         OnTriggerExitSuccessAction.Invoke(RangeObjectPhysicsTriggerInfo.OtherInteractiveObject);
     }
 }
예제 #3
0
        public sealed override void OnTriggerEnter(RangeObjectPhysicsTriggerInfo PhysicsTriggerInfo)
        {
            var rangeIntersectionCalculator = new RangeIntersectionCalculator(associatedRangeObject, PhysicsTriggerInfo.OtherInteractiveObject);

            intersectionCalculators.Add(rangeIntersectionCalculator);
            intersectionCalculatorsIndexedByTrackedInteractiveObject[PhysicsTriggerInfo.OtherInteractiveObject] = rangeIntersectionCalculator;
            OnTriggerEnterSuccess(PhysicsTriggerInfo);
        }
예제 #4
0
        public sealed override void OnTriggerExit(RangeObjectPhysicsTriggerInfo PhysicsTriggerInfo)
        {
            var rangeIntersectionCalculator = intersectionCalculatorsIndexedByTrackedInteractiveObject[PhysicsTriggerInfo.OtherInteractiveObject];

            if (rangeIntersectionCalculator.IsInside)
            {
                justTriggerExitedCalculators.Add(rangeIntersectionCalculator);
                justTriggerExitedCalculatorsIndexedByTrackedInteractiveObject.Add(PhysicsTriggerInfo.OtherInteractiveObject, rangeIntersectionCalculator);
            }

            intersectionCalculators.Remove(rangeIntersectionCalculator);
            intersectionCalculatorsIndexedByTrackedInteractiveObject.Remove(PhysicsTriggerInfo.OtherInteractiveObject);
            OnTriggerExitSuccess(PhysicsTriggerInfo);
        }
예제 #5
0
 public void OnTriggerExit(Collider other)
 {
     InteractiveObjectV2Manager.Get().InteractiveObjectsIndexedByLogicCollider.TryGetValue(other, out CoreInteractiveObject OtherInteractiveObject);
     if (OtherInteractiveObject != null && ((this.AssociatedInteractiveObject != null && OtherInteractiveObject != this.AssociatedInteractiveObject) || this.AssociatedInteractiveObject == null))
     {
         this.CurrentlyTrackedColliders.Remove(other);
         var RangeObjectPhysicsTriggerInfo = new RangeObjectPhysicsTriggerInfo {
             Other = other, OtherInteractiveObject = OtherInteractiveObject
         };
         for (var i = 0; i < this.PhysicsEventListeners.Count; i++)
         {
             if (this.PhysicsEventListeners[i].ColliderSelectionGuard(RangeObjectPhysicsTriggerInfo))
             {
                 this.PhysicsEventListeners[i].OnTriggerExit(RangeObjectPhysicsTriggerInfo);
             }
         }
     }
 }
예제 #6
0
 public override bool ColliderSelectionGuard(RangeObjectPhysicsTriggerInfo RangeObjectPhysicsTriggerInfo)
 {
     return(this.SelectionGuard.Compare(RangeObjectPhysicsTriggerInfo.OtherInteractiveObject.InteractiveObjectTag));
 }
예제 #7
0
 public override void OnTriggerExit(RangeObjectPhysicsTriggerInfo PhysicsTriggerInfo)
 {
     this.AssociatedObstacleListener.RemoveNearSquareObstacle((ObstacleInteractiveObject)PhysicsTriggerInfo.OtherInteractiveObject);
 }
예제 #8
0
 protected virtual void OnTriggerExitSuccess(RangeObjectPhysicsTriggerInfo RangeObjectPhysicsTriggerInfo)
 {
 }
예제 #9
0
 public virtual bool ColliderSelectionGuard(RangeObjectPhysicsTriggerInfo RangeObjectPhysicsTriggerInfo)
 {
     return(true);
 }
예제 #10
0
 public virtual void OnTriggerExit(RangeObjectPhysicsTriggerInfo PhysicsTriggerInfo)
 {
 }