Beispiel #1
0
 public MoveTowardsPlayerStateManager(TrackAndKillPlayerStateBehavior trackAndKillAIbehaviorRef, SoldierAIBehaviorDefinition SoldierAIBehaviorDefinition,
                                      CoreInteractiveObject AssociatedInteractiveObject, PlayerObjectStateDataSystem playerObjectStateDataSystem, WeaponFiringAreaSystem WeaponFiringAreaSystem,
                                      ISetAIAgentDestinationActionCallback ISetAIAgentDestinationActionCallback, IMoveTowardsPlayerStateManagerWorkflowCallback IMoveTowardsPlayerStateManagerWorkflowCallback)
 {
     TrackAndKillAIbehaviorRef                           = trackAndKillAIbehaviorRef;
     this.SoldierAIBehaviorDefinition                    = SoldierAIBehaviorDefinition;
     this.AssociatedInteractiveObject                    = AssociatedInteractiveObject;
     PlayerObjectStateDataSystem                         = playerObjectStateDataSystem;
     this.WeaponFiringAreaSystem                         = WeaponFiringAreaSystem;
     this.ISetAIAgentDestinationActionCallback           = ISetAIAgentDestinationActionCallback;
     this.IMoveTowardsPlayerStateManagerWorkflowCallback = IMoveTowardsPlayerStateManagerWorkflowCallback;
 }
Beispiel #2
0
 public MoveAroundPlayerStateManager(TrackAndKillPlayerStateBehavior trackAndKillPlayerStateBehaviorRef,
                                     PlayerObjectStateDataSystem playerObjectStateDataSystem, CoreInteractiveObject associatedInteractiveObject,
                                     WeaponFiringAreaSystem WeaponFiringAreaSystem,
                                     ISetAIAgentDestinationActionCallback ISetAIAgentDestinationActionCallback,
                                     IMoveAroundPlayerStateManagerWorkflowCallback IMoveAroundPlayerStateManagerWorkflowCallback)
 {
     _trackAndKillPlayerStateBehaviorRef                = trackAndKillPlayerStateBehaviorRef;
     PlayerObjectStateDataSystem                        = playerObjectStateDataSystem;
     AssociatedInteractiveObject                        = associatedInteractiveObject;
     this.ISetAIAgentDestinationActionCallback          = ISetAIAgentDestinationActionCallback;
     this.IMoveAroundPlayerStateManagerWorkflowCallback = IMoveAroundPlayerStateManagerWorkflowCallback;
     this.WeaponFiringAreaSystem                        = WeaponFiringAreaSystem;
 }
Beispiel #3
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;
 }
Beispiel #4
0
 public void Init(CoreInteractiveObject AssociatedInteractiveObject, SoldierAIBehaviorDefinition SoldierAIBehaviorDefinition,
                  PlayerObjectStateDataSystem PlayerObjectStateDataSystem, SoldierAIBehaviorExternalCallbacksV2 SoldierAIBehaviorExternalCallbacksV2,
                  Action AskTrackAndKillPlayerStateBehaviorExitAction)
 {
     this.WeaponFiringAreaSystem = new WeaponFiringAreaSystem(AssociatedInteractiveObject, PlayerObjectStateDataSystem, SoldierAIBehaviorExternalCallbacksV2, SoldierAIBehaviorExternalCallbacksV2);
     this.StateManagersLookup    = new Dictionary <TrackAndKillPlayerStateEnum, SoldierStateManager>()
     {
         { TrackAndKillPlayerStateEnum.LISTENING, new ListeningStateManager() },
         { TrackAndKillPlayerStateEnum.MOVE_TOWARDS_PLAYER, new MoveTowardsPlayerStateManager(this, SoldierAIBehaviorDefinition, AssociatedInteractiveObject, PlayerObjectStateDataSystem, this.WeaponFiringAreaSystem, SoldierAIBehaviorExternalCallbacksV2, SoldierAIBehaviorExternalCallbacksV2) },
         { TrackAndKillPlayerStateEnum.SHOOTING_AT_PLAYER, new ShootingAtPlayerStateManager(this, PlayerObjectStateDataSystem, AssociatedInteractiveObject, SoldierAIBehaviorDefinition, this.WeaponFiringAreaSystem, SoldierAIBehaviorExternalCallbacksV2, SoldierAIBehaviorExternalCallbacksV2, SoldierAIBehaviorExternalCallbacksV2) },
         { TrackAndKillPlayerStateEnum.GO_ROUND_PLAYER, new MoveAroundPlayerStateManager(this, PlayerObjectStateDataSystem, AssociatedInteractiveObject, this.WeaponFiringAreaSystem, SoldierAIBehaviorExternalCallbacksV2, SoldierAIBehaviorExternalCallbacksV2) },
         { TrackAndKillPlayerStateEnum.MOVE_TO_LAST_SEEN_PLAYER_POSITION, new MoveToLastSeenPlayerPositionStateManager(this, PlayerObjectStateDataSystem, SoldierAIBehaviorExternalCallbacksV2, AskTrackAndKillPlayerStateBehaviorExitAction, SoldierAIBehaviorExternalCallbacksV2) }
     };
     base.Init(TrackAndKillPlayerStateEnum.LISTENING);
 }
Beispiel #5
0
 public static bool PlayerInSightButNoObstaclesBetween(PlayerObjectStateDataSystem PlayerObjectStateDataSystem, WeaponFiringAreaSystem WeaponFiringAreaSystem)
 {
     return(PlayerObjectStateDataSystem.IsPlayerInSight.GetValue() && !WeaponFiringAreaSystem.AreObstaclesInside());
 }