Ejemplo n.º 1
0
 public int OnRangeIntersectionCalculatorV2ManagerCreation(RangeIntersectionCalculator rangeIntersectionCalculator)
 {
     this.AllRangeIntersectionCalculatorV2.Add(rangeIntersectionCalculator);
     this.CurrentRangeIntersectionCalculatorV2ManagerCounter += 1;
     rangeIntersectionCalculator.GetAssociatedRangeObject().RegisterOnRangeObjectDestroyedEventListener(this.OnRangeObjectDestroyed);
     rangeIntersectionCalculator.TrackedInteractiveObject.RegisterInteractiveObjectDestroyedEventListener(this.OnTrackedInteractiveObjectDestroyed);
     return(this.CurrentRangeIntersectionCalculatorV2ManagerCounter);
 }
Ejemplo n.º 2
0
 public void CalculationDataSetupForRangeIntersectionCalculator(RangeIntersectionCalculator rangeIntersectionCalculator,
                                                                IsOccludedByObstacleJobData IsOccludedByObstacleJobData, int currentObstacleIntersectionCalculatorCounter)
 {
     if (rangeIntersectionCalculator.GetAssociatedRangeObjectType() == RangeType.SPHERE)
     {
         var SphereRangeObject         = (SphereRangeObjectV2)rangeIntersectionCalculator.GetAssociatedRangeObject();
         var SphereIntersectionJobData = new SphereIntersectionJobData
         {
             RangeIntersectionCalculatorV2UniqueID = rangeIntersectionCalculator.RangeIntersectionCalculatorV2UniqueID,
             RangeTransform = SphereRangeObject.GetTransform(),
             IsOccludedByObstacleJobData  = IsOccludedByObstacleJobData,
             ComparedCollider             = rangeIntersectionCalculator.TrackedInteractiveObject.InteractiveGameObject.GetLogicColliderBoxDefinition(),
             ObstacleCalculationDataIndex = SphereRangeObject.GetObstacleListener() == null ? -1 : (currentObstacleIntersectionCalculatorCounter - 1),
             SphereRadius = SphereRangeObject.SphereBoundingCollider.radius
         };
         this.SphereIntersectionJobData[this.currentSphereIntersectionJobdataCounter] = SphereIntersectionJobData;
         this.currentSphereIntersectionJobdataCounter += 1;
     }
 }
Ejemplo n.º 3
0
 public void CalculationDataSetupForRangeIntersectionCalculator(RangeIntersectionCalculator rangeIntersectionCalculator,
                                                                IsOccludedByObstacleJobData IsOccludedByObstacleJobData, int currentObstacleIntersectionCalculatorCounter)
 {
     if (rangeIntersectionCalculator.GetAssociatedRangeObjectType() == RangeType.ROUNDED_FRUSTUM)
     {
         var RoundedFrustumRangeObject         = (RoundedFrustumRangeObjectV2)rangeIntersectionCalculator.GetAssociatedRangeObject();
         var RoundedFrustumIntersectionJobData = new RoundedFrustumIntersectionJobData
         {
             RangeIntersectionCalculatorV2UniqueID = rangeIntersectionCalculator.RangeIntersectionCalculatorV2UniqueID,
             FrustumRadius  = RoundedFrustumRangeObject.GetFrustum().GetFrustumFaceRadius(),
             RangeTransform = RoundedFrustumRangeObject.GetTransform(),
             IsOccludedByObstacleJobData  = IsOccludedByObstacleJobData,
             RoundedFrustumPositions      = RoundedFrustumRangeObject.GetFrustumWorldPositions(),
             ComparedCollider             = rangeIntersectionCalculator.TrackedInteractiveObject.InteractiveGameObject.GetLogicColliderBoxDefinition(),
             ObstacleCalculationDataIndex = RoundedFrustumRangeObject.GetObstacleListener() == null ? -1 : (currentObstacleIntersectionCalculatorCounter - 1)
         };
         this.RoundedFrustumIntersectionJobData[currentRoundedFrustumIntersectionJobDataCounter] = RoundedFrustumIntersectionJobData;
         currentRoundedFrustumIntersectionJobDataCounter += 1;
     }
 }