Example #1
0
 public ShootingAtPlayerStateManager(TrackAndKillPlayerStateBehavior trackAndKillAIbehaviorRef, PlayerObjectStateDataSystem playerObjectStateDataSystem,
                                     CoreInteractiveObject associatedInteractiveObject, SoldierAIBehaviorDefinition SoldierAIBehaviorDefinition, WeaponFiringAreaSystem WeaponFiringAreaSystem,
                                     ISetAIAgentDestinationActionCallback ISetAIAgentDestinationActionCallback, IFiringProjectileCallback IFiringProjectileCallback,
                                     IShootingAtPlayerWorkflowCallback IShootingAtPlayerWorkflowCallback)
 {
     this.TrackAndKillAIbehaviorRef            = trackAndKillAIbehaviorRef;
     PlayerObjectStateDataSystem               = playerObjectStateDataSystem;
     AssociatedInteractiveObject               = associatedInteractiveObject;
     this.SoldierAIBehaviorDefinition          = SoldierAIBehaviorDefinition;
     this.WeaponFiringAreaSystem               = WeaponFiringAreaSystem;
     this.ISetAIAgentDestinationActionCallback = ISetAIAgentDestinationActionCallback;
     this.IFiringProjectileCallback            = IFiringProjectileCallback;
     this.IShootingAtPlayerWorkflowCallback    = IShootingAtPlayerWorkflowCallback;
 }
Example #2
0
        public WeaponFiringAreaSystem(CoreInteractiveObject associatedInteractiveObject, PlayerObjectStateDataSystem playerObjectStateDataSystem,
                                      IFiringProjectileCallback IFiringProjectileCallback, IWeaponDataRetrieval IWeaponDataRetrieval)
        {
            AssociatedInteractiveObject    = associatedInteractiveObject;
            PlayerObjectStateDataSystem    = playerObjectStateDataSystem;
            this.IFiringProjectileCallback = IFiringProjectileCallback;
            this.IWeaponDataRetrieval      = IWeaponDataRetrieval;

            this.WeaponFiringAreaBoxRangeObject = new BoxRayRangeObject(associatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent, new BoxRangeObjectInitialization()
            {
                RangeTypeID = RangeTypeID.NOT_DISPLAYED,
                IsTakingIntoAccountObstacles = false,
                BoxRangeTypeDefinition       = new BoxRangeTypeDefinition()
            }, associatedInteractiveObject,
                                                                        2f,
                                                                        delegate(InteractiveObjectPhysicsTriggerInfo interactiveObjectPhysicsTriggerInfo) { return(interactiveObjectPhysicsTriggerInfo.GetOtherInteractiveObjectTag().IsObstacle); }
                                                                        , "WeaponFiringAreaBoxRangeObject");
            this.EndOfRayTransformPoint = new GameObject("WeaponFiringAreaBoxRangeObject_EndOfRayTransform").transform;
            this.EndOfRayTransformPoint.transform.parent = associatedInteractiveObject.InteractiveGameObject.InteractiveGameObjectParent.transform;
        }