示例#1
0
        public ObjectsInsideDeflectionRangeSystem(CoreInteractiveObject associatedInteractiveObject,
                                                  ProjectileDeflectionTrackingInteractiveObjectActionInherentData projectileDeflectionTrackingInteractiveObjectActionInherentData,
                                                  Action <CoreInteractiveObject> OnInteractiveObjectJusInsideAndFiltered = null, Action <CoreInteractiveObject> OnInteractiveObjectJustOutsideAndFiltered = null)
        {
            this.associatedInteractiveObject = associatedInteractiveObject;
            this._projectileDeflectionTrackingInteractiveObjectActionInherentData = projectileDeflectionTrackingInteractiveObjectActionInherentData;
            this.SphereOverlapRangeObject = null;
            this.OnInteractiveObjectJusInsideAndFiltered   = OnInteractiveObjectJusInsideAndFiltered;
            this.OnInteractiveObjectJustOutsideAndFiltered = OnInteractiveObjectJustOutsideAndFiltered;

            this.SphereOverlapRangeObject = new SphereOverlapRangeObject(associatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent, new SphereRangeObjectInitialization()
            {
                name        = "ProjectileDeflectionRange",
                RangeTypeID = RangeTypeID.NOT_DISPLAYED,
                IsTakingIntoAccountObstacles = false,
                SphereRangeTypeDefinition    = new SphereRangeTypeDefinition()
                {
                    Radius = this._projectileDeflectionTrackingInteractiveObjectActionInherentData.ProjectileDetectionRadius
                }
            }, associatedInteractiveObject, delegate(InteractiveObjectPhysicsTriggerInfo InteractiveObjectPhysicsTriggerInfo) { return(InteractiveObjectPhysicsTriggerInfo.GetOtherInteractiveObjectTag().IsDealingDamage); },
                                                                         "ProjectileDeflectionRange", OnInteractiveObjectJusInsideAndFiltered: OnInteractiveObjectJusInsideAndFiltered, OnInteractiveObjectJustOutsideAndFiltered: OnInteractiveObjectJustOutsideAndFiltered);
            SetDeflectionRangeCenterAsLogicColliderCenter();
            this.SphereOverlapRangeObject.ManuallyDetectInsideColliders();
        }
示例#2
0
 public ProjectileDeflectionSystemInput(ProjectileDeflectionTrackingInteractiveObjectActionInherentData projectileDeflectionTrackingInteractiveObjectActionInherentData, CoreInteractiveObject associatedInteractiveObject)
 {
     this.ProjectileDeflectionTrackingInteractiveObjectActionInherentData = projectileDeflectionTrackingInteractiveObjectActionInherentData;
     AssociatedInteractiveObject = associatedInteractiveObject;
 }