Beispiel #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);
        }
Beispiel #2
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);
        }
Beispiel #3
0
 public BoxRayRangeObject(GameObject AssociatedGameObject, BoxRangeObjectInitialization BoxRangeObjectInitialization, CoreInteractiveObject AssociatedInteractiveObject,
                          float rayWidth, Func <InteractiveObjectPhysicsTriggerInfo, bool> InteractiveObjectSelectionGuard, string objectName = "")
     : base(AssociatedGameObject, BoxRangeObjectInitialization, AssociatedInteractiveObject, objectName)
 {
     this.InteractiveObjectSelectionGuard       = InteractiveObjectSelectionGuard;
     this.InteractiveObjectLocalContainerSystem = new InteractiveObjectLocalContainerSystem(null, null);
     this.RayWidth = rayWidth;
     this.RegisterPhysicsEventListener(new InteractiveObjectPhysicsEventListenerDelegated(
                                           InteractiveObjectSelectionGuard,
                                           onTriggerEnterAction: this.OnTriggerEnter,
                                           onTriggerExitAction: this.OnTriggerExit
                                           ));
 }
Beispiel #4
0
 public RangeGameObjectV2(GameObject attachedGameObject, BoxRangeObjectInitialization BoxRangeObjectInitialization, RangeObjectV2 RangeObjectV2, CoreInteractiveObject AssociatedInteractiveObject, string objectName)
 {
     this.attachedGameObject = attachedGameObject;
     this.CommontInit(BoxRangeObjectInitialization, RangeObjectV2, AssociatedInteractiveObject, objectName);
     this.BoundingCollider = RangeObjectBoundingColliderBuilder.BuildBoundingCollider(BoxRangeObjectInitialization, this);
 }