Esempio n. 1
0
        public BoxRangeObjectV2(GameObject AssociatedGameObject, BoxRangeObjectInitialization BoxRangeObjectInitialization, CoreInteractiveObject AssociatedInteractiveObject, string objectName = "")
        {
            this.RangeType = RangeType.BOX;
            this.BoxRangeObjectInitialization = BoxRangeObjectInitialization;
            var RangeGameObjectV2 = new RangeGameObjectV2(AssociatedGameObject, this.BoxRangeObjectInitialization, this, AssociatedInteractiveObject, objectName);

            base.Init(RangeGameObjectV2, BoxRangeObjectInitialization);
        }
Esempio n. 2
0
        public SphereRangeObjectV2(GameObject AssociatedGameObject, SphereRangeObjectInitialization SphereRangeObjectInitialization, CoreInteractiveObject AssociatedInteractiveObject, string objectName = "")
        {
            this.RangeType = RangeType.SPHERE;
            this.SphereRangeObjectInitialization = SphereRangeObjectInitialization;
            var RangeGameObjectV2 = new RangeGameObjectV2(AssociatedGameObject, this.SphereRangeObjectInitialization, this, AssociatedInteractiveObject, objectName);

            this.SphereBoundingCollider = (SphereCollider)RangeGameObjectV2.BoundingCollider;
            base.Init(RangeGameObjectV2, SphereRangeObjectInitialization);
        }
Esempio n. 3
0
        private static Collider BuildBoundingCollider(FrustumV2 Frustum, RangeGameObjectV2 RangeGameObject)
        {
            var boxCollider = RangeGameObject.RangeGameObject.AddComponent <BoxCollider>();

            boxCollider.center    = new Vector3(0, 0, Frustum.F2.FaceOffsetFromCenter.z / 4f);
            boxCollider.size      = new Vector3(Mathf.Max(Frustum.F1.Width, Frustum.F2.Width), Math.Max(Frustum.F1.Height, Frustum.F2.Height), Frustum.F2.FaceOffsetFromCenter.z / 2f);
            boxCollider.isTrigger = true;
            return(boxCollider);
        }
Esempio n. 4
0
        public FrustumRangeObjectV2(GameObject AssociatedGameObject, FrustumRangeObjectInitialization FrustumRangeObjectInitialization, CoreInteractiveObject AssociatedInteractiveObject, string objectName = "")
        {
            this.RangeType = RangeType.FRUSTUM;

            this.FrustumRangeObjectInitialization    = FrustumRangeObjectInitialization;
            this.FrustumRangeObjectPositioningSystem = new FrustumRangeObjectPositioningSystem(this.GetFrustum(), this);
            var RangeGameObjectV2 = new RangeGameObjectV2(AssociatedGameObject, this.FrustumRangeObjectInitialization, this, AssociatedInteractiveObject, objectName);

            base.Init(RangeGameObjectV2, FrustumRangeObjectInitialization);
        }
Esempio n. 5
0
        private static Collider BuildBoundingCollider(FrustumV2 Frustum, RangeGameObjectV2 RangeGameObject)
        {
            Frustum.BuildLocalBoundingBox(out Vector3 localSize, out Vector3 localCenter);
            var boxCollider = RangeGameObject.RangeGameObject.AddComponent <BoxCollider>();

            boxCollider.center    = localCenter;
            boxCollider.size      = localSize;
            boxCollider.isTrigger = true;
            return(boxCollider);
        }
Esempio n. 6
0
        protected void Init(RangeGameObjectV2 RangeGameObjectV2, RangeObjectInitialization RangeObjectInitialization)
        {
            this.RangeGameObjectV2         = RangeGameObjectV2;
            this.RangeObjectInitialization = RangeObjectInitialization;

            this.RangeIntersectionV2System = new RangeIntersectionV2System(this);
            this.RangeExternalPhysicsOnlyListenersSystem = new RangeExternalPhysicsOnlyListenersSystem(this, this.RangeGameObjectV2.InteractiveInteractiveObjectPhysicsListener);
            if (RangeObjectInitialization.IsTakingIntoAccountObstacles)
            {
                this.RangeObstacleListenerSystem = new RangeObstacleListenerSystem(this, this.RangeGameObjectV2.InteractiveInteractiveObjectPhysicsListener);
            }

            this.RangeEventsManager.OnRangeObjectCreated(this);
        }
Esempio n. 7
0
        public static Collider BuildBoundingCollider(SphereRangeObjectInitialization SphereRangeObjectInitialization, RangeGameObjectV2 RangeGameObject)
        {
            var sphereCollider = RangeGameObject.RangeGameObject.AddComponent <SphereCollider>();

            sphereCollider.radius    = SphereRangeObjectInitialization.SphereRangeTypeDefinition.Radius;
            sphereCollider.center    = SphereRangeObjectInitialization.SphereRangeTypeDefinition.Center;
            sphereCollider.isTrigger = true;
            return(sphereCollider);
        }
Esempio n. 8
0
 public static Collider BuildBoundingCollider(RoundedFrustumRangeObjectInitialization RoundedFrustumRangeObjectInitialization, RangeGameObjectV2 RangeGameObject)
 {
     return(BuildBoundingCollider(RoundedFrustumRangeObjectInitialization.RoundedFrustumRangeTypeDefinition.FrustumV2, RangeGameObject));
 }
Esempio n. 9
0
        public static Collider BuildBoundingCollider(BoxRangeObjectInitialization BoxRangeObjectInitialization, RangeGameObjectV2 RangeGameObject)
        {
            var boxCollider = RangeGameObject.RangeGameObject.AddComponent <BoxCollider>();

            boxCollider.center    = BoxRangeObjectInitialization.BoxRangeTypeDefinition.Center;
            boxCollider.size      = BoxRangeObjectInitialization.BoxRangeTypeDefinition.Size;
            boxCollider.isTrigger = true;
            return(boxCollider);
        }