Beispiel #1
0
        public DisarmObjectSystem(CoreInteractiveObject AssociatedInteractiveObject, DisarmSystemDefinition DisarmObjectInitializationData,
                                  InteractiveObjectTagStruct PhysicsEventListenerGuard, Action <CoreInteractiveObject> OnAssociatedDisarmObjectTriggerEnter,
                                  Action <CoreInteractiveObject> OnAssociatedDisarmObjectTriggerExit)
        {
            DisarmSystemDefinition = DisarmObjectInitializationData;
            SphereRange            = new SphereRangeObjectV2(AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent, new SphereRangeObjectInitialization
            {
                RangeTypeID = RangeTypeID.NOT_DISPLAYED,
                IsTakingIntoAccountObstacles = false,
                SphereRangeTypeDefinition    = new SphereRangeTypeDefinition
                {
                    Radius = DisarmObjectInitializationData.DisarmRange
                }
            }, AssociatedInteractiveObject, AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.name + "_DisarmTriggerRange");
            SphereRange.RegisterPhysicsEventListener(new RangeObjectV2PhysicsEventListener_Delegated(PhysicsEventListenerGuard, OnAssociatedDisarmObjectTriggerEnter, OnAssociatedDisarmObjectTriggerExit));

            ProgressBarGameObject = new GameObject("ProgressBar");
            ProgressBarGameObject.transform.parent = AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.transform;
            progressbar = ProgressBarGameObject.AddComponent <CircleFillBarType>();

            progressbar.Init(Camera.main);
            progressbar.transform.position = AssociatedInteractiveObject.InteractiveGameObject.GetTransform().WorldPosition + (Vector3.up * (AssociatedInteractiveObject.InteractiveGameObject.AverageModelBounds.Bounds.max.y));
            progressbar.gameObject.SetActive(false);

            elapsedTime = 0f;
        }
Beispiel #2
0
 public LevelCompletionZoneSystem(CoreInteractiveObject AssociatedInteractiveObject, LevelCompletionZoneSystemDefinition LevelCompletionZoneSystemDefinition,
                                  InteractiveObjectTagStruct ComparedInteractiveObjectTagStruct,
                                  Action <CoreInteractiveObject> OnLevelCompletionTriggerEnterPlayer)
 {
     LevelCompletionZoneObject = RangeObjectV2Builder.Build(AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent,
                                                            LevelCompletionZoneSystemDefinition.TriggerRangeObjectInitialization, AssociatedInteractiveObject, AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.name + "_LevelCompletionZoneListener");
     LevelCompletionZoneObject.RegisterPhysicsEventListener(new RangeObjectV2PhysicsEventListener_Delegated(ComparedInteractiveObjectTagStruct, OnLevelCompletionTriggerEnterPlayer));
 }
Beispiel #3
0
 public LevelCompletionZoneSystem(CoreInteractiveObject AssociatedInteractiveObject, LevelCompletionZoneSystemDefinition LevelCompletionZoneSystemDefinition,
                                  Func <InteractiveObjectPhysicsTriggerInfo, bool> PhysicsEventListenerGuard,
                                  Action <CoreInteractiveObject> OnLevelCompletionTriggerEnterPlayer)
 {
     LevelCompletionZoneObject = RangeObjectV2Builder.Build(AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent,
                                                            LevelCompletionZoneSystemDefinition.TriggerRangeObjectInitialization, AssociatedInteractiveObject, AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.name + "_LevelCompletionZoneListener");
     LevelCompletionZoneObject.RegisterPhysicsEventListener(new InteractiveObjectPhysicsEventListenerDelegated(PhysicsEventListenerGuard, OnLevelCompletionTriggerEnterPlayer));
 }
Beispiel #4
0
 public SelectableObjectSystem(CoreInteractiveObject AssociatedInteractiveObject,
                               SelectableObjectSystemDefinition SelectableObjectSystemDefinition, object AssociatedPlayerAction) //TODO -> replace object with RTPPlayerAction ref
 {
     this.AssociatedInteractiveObject = AssociatedInteractiveObject;
     this.AssociatedPlayerAction      = AssociatedPlayerAction;
     SphereRange = new SphereRangeObjectV2(AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent, new SphereRangeObjectInitialization()
     {
         RangeTypeID = RangeTypeID.NOT_DISPLAYED,
         IsTakingIntoAccountObstacles = false,
         SphereRangeTypeDefinition    = new SphereRangeTypeDefinition
         {
             Radius = SelectableObjectSystemDefinition.SelectionRange
         }
     }, AssociatedInteractiveObject, AssociatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.name + "_SelectionRangeTrigger");
     SphereRange.RegisterPhysicsEventListener(new SelectableObjectPhysicsEventListener(OnPlayerTriggerInSelectionEnter, OnPlayerTriggerInSelectionExit));
 }