Example #1
0
 public AimingInteractiveObjectActionStateBehaviorInputDataSystem(GameInputManager gameInputManager, InteractiveObjectActionPlayerSystem interactiveObjectActionPlayerSystem,
                                                                  InteractiveObjectActionInherentData firingInteractiveObjectActionInherentData)
 {
     GameInputManager = gameInputManager;
     InteractiveObjectActionPlayerSystem            = interactiveObjectActionPlayerSystem;
     this.firingInteractiveObjectActionInherentData = firingInteractiveObjectActionInherentData;
 }
Example #2
0
        public SkillSlot(CoreInteractiveObject AssociatedInteractiveObject, InteractiveObjectActionPlayerSystem interactiveObjectActionPlayerSystem, ref SKillSlotUIPositionInput SKillSlotUIPositionInput,
                         InputID AssociatedInput)
        {
            this.AssociatedInteractiveObject          = AssociatedInteractiveObject;
            this._interactiveObjectActionPlayerSystem = interactiveObjectActionPlayerSystem;
            this.AssociatedInput = AssociatedInput;
            this.SkillSlotUI     = new SkillSlotUI(ref SKillSlotUIPositionInput);
            this.CurrentPlayerActionInherentData = new ObjectVariable <InteractiveObjectActionInherentData>(this.OnCurrentPlayerActionInherentDataChanged);

            this.SkillSlotUI.SetInputText(InputControlLookup.GetInputControlRawName(InputControlLookup.FindTheFirstInputControlForInputID(this.AssociatedInput)));
        }
Example #3
0
        public SoliderEnemy(IInteractiveGameObject parent, SoliderEnemyDefinition SoliderEnemyDefinition)
        {
            var mainCamera = Camera.main;

            parent.CreateLogicCollider(SoliderEnemyDefinition.InteractiveObjectBoxLogicColliderDefinition);
            parent.CreateAgent(SoliderEnemyDefinition.AIAgentDefinition);
            this.interactiveObjectTag = new InteractiveObjectTag()
            {
                IsTakingDamage = true
            };
            BaseInit(parent);
            this.InteractiveObjectActionPlayerSystem = new InteractiveObjectActionPlayerSystem(this);
            this.HealthSystem = new HealthSystem(this, SoliderEnemyDefinition.HealthSystemDefinition, this.OnHealthChanged);
            this._stunningDamageDealerReceiverSystem = new StunningDamageDealerReceiverSystem(SoliderEnemyDefinition.stunningDamageDealerReceiverSystemDefinition, this.HealthSystem, this.OnStunningDamageDealingStarted, this.OnStunningDamageDealingEnded);
            this.WeaponHandlingSystem = new WeaponHandlingSystem(this,
                                                                 new WeaponHandlingSystemInitializationData(this, SoliderEnemyDefinition.WeaponHandlingSystemDefinition.WeaponHandlingFirePointOriginLocalDefinition,
                                                                                                            SoliderEnemyDefinition.WeaponHandlingSystemDefinition.WeaponDefinition));
            this.FiringTargetPositionSystem        = new FiringTargetPositionSystem(SoliderEnemyDefinition.FiringTargetPositionSystemDefinition);
            this.ObjectMovementSpeedSystem         = new ObjectMovementSpeedSystem(this, SoliderEnemyDefinition.AITransformMoveManagerComponentV3, new UnConstrainedObjectSpeedAttenuationValueSystem(AIMovementSpeedAttenuationFactor.RUN), ObjectSpeedCalculationType.AGENT);
            this.AIMoveToDestinationSystem         = new AIMoveToDestinationSystem(this, SoliderEnemyDefinition.AITransformMoveManagerComponentV3, this.OnAIDestinationReached);
            this.SoliderEnemyAnimationStateManager = new SoliderEnemyAnimationStateManager(this.AnimationController, SoliderEnemyDefinition.LocomotionAnimation, SoliderEnemyDefinition.SoldierAnimationSystemDefinition);
            this._soldierStateBehavior             = new SoldierStateBehavior();

            this.SightObjectSystem = new SightObjectSystem(this, SoliderEnemyDefinition.SightObjectSystemDefinition, tag => tag.IsPlayer || tag.IsGivingHealth,
                                                           this._soldierStateBehavior.OnInteractiveObjectJustOnSight, null, this._soldierStateBehavior.OnInteractiveObjectJustOutOfSight);

            Profiler.BeginSample("SoliderEnemy : Memory test");
            this.SightVisualFeedbackSystemPtr = SightVisualFeedbackSystemPointer.Allocate();
            this.SightVisualFeedbackSystemPtr.Ref()->Initialize(SoliderEnemyDefinition.SightVisualFeedbackSystemDefinition, this, mainCamera);
            this.SightVisualFeedbackStateBehavior = new SightVisualFeedbackStateBehavior(this.SightVisualFeedbackSystemPtr);
            Profiler.EndSample();

            this._soldierStateBehavior.Init(this, SoliderEnemyDefinition.SoldierAIBehaviorDefinition,
                                            new SoldierAIBehaviorExternalCallbacksV2()
            {
                SetAIAgentDestinationAction          = this.SetDestination,
                SetAIAgentDestinationAction_NoReturn = (IAgentMovementCalculationStrategy => this.SetDestination(IAgentMovementCalculationStrategy)),
                SetAIAgentSpeedAttenuationAction     = this.SetAISpeedAttenuationFactor,
                ClearAIAgentPathAction = this.AIMoveToDestinationSystem.ClearPath,
                AskToFireAFiredprojectile_WithWorldDirection_Action = this.FireProjectileAction_Start,
                GetWeaponFirePointOriginLocalDefinitionAction       = () => SoliderEnemyDefinition.WeaponHandlingSystemDefinition.WeaponHandlingFirePointOriginLocalDefinition,
                OnShootingAtPlayerStartAction = this.OnShootingAtPlayerStart,
                OnShootingAtPlayerEndAction   = this.OnShootingAtPlayerEnd,
                GetIWeaponHandlingSystem_DataRetrievalAction = this.WeaponHandlingSystem,
                OnMoveTowardsPlayerStartedAction             = (CoreInteractiveObject MovingTowardsObject) => this.SightVisualFeedbackStateBehavior.SetSightVisualFeedbackState(SightVisualFeedbackState.DANGER),
                OnMoveTowardsPlayerEndedAction              = () => this.SightVisualFeedbackStateBehavior.SetSightVisualFeedbackState(SightVisualFeedbackState.NONE),
                OnMoveAroundPlayerStartedAction             = (Vector3 LockedWorldPosition) => this.SightVisualFeedbackStateBehavior.SetSightVisualFeedbackState(SightVisualFeedbackState.WARNING),
                OnMoveAroundPlayerEndedAction               = () => this.SightVisualFeedbackStateBehavior.SetSightVisualFeedbackState(SightVisualFeedbackState.NONE),
                OnMoveToLastSeenPlayerPositionStartedAction = (Vector3 LockedWorldPosition) => this.SightVisualFeedbackStateBehavior.SetSightVisualFeedbackState(SightVisualFeedbackState.WARNING),
                OnMoveToLastSeenPlayerPositionEndedAction   = () => this.SightVisualFeedbackStateBehavior.SetSightVisualFeedbackState(SightVisualFeedbackState.NONE)
            });
        }
Example #4
0
 public PlayerDashDirectionActionStateManager(
     PlayerDashActionStateBehavior PlayerDashActionStateBehavior,
     InteractiveObjectActionPlayerSystem interactiveObjectActionPlayerSystem,
     PlayerDashActionStateBehaviorInputDataSystemDefinition playerDashActionStateBehaviorInputDataSystemDefinitionRef,
     ref PlayerDashTargetPositionTrackerSystem PlayerDashTargetPositionTrackerSystemRef,
     PlayerObjectInteractiveObjectActionStateManagerCallbacks_PlayerDashDirectionCallbacks PlayerObjectInteractiveObjectActionStateManagerCallbacks_PlayerDashDirectionCallbacks)
 {
     this.PlayerDashActionStateBehavior  = PlayerDashActionStateBehavior;
     InteractiveObjectActionPlayerSystem = interactiveObjectActionPlayerSystem;
     this._playerDashActionStateBehaviorInputDataSystemDefinitionRef = playerDashActionStateBehaviorInputDataSystemDefinitionRef;
     this.PlayerDashTargetPositionTrackerSystemRef = PlayerDashTargetPositionTrackerSystemRef;
     this.PlayerObjectInteractiveObjectActionStateManagerCallbacks_PlayerDashDirectionCallbacks = PlayerObjectInteractiveObjectActionStateManagerCallbacks_PlayerDashDirectionCallbacks;
 }
Example #5
0
        public SkillSystem(CoreInteractiveObject AssociatedInteractiveObject, InteractiveObjectActionPlayerSystem interactiveObjectActionPlayerSystem)
        {
            SKillSlotUIPositionInput SKillSlotUIPositionInput = default(SKillSlotUIPositionInput);

            BuildSKillSlotUIPositionInputForMainWeapon(ref SKillSlotUIPositionInput);
            this.MainWeaponSkillSlot = new SkillSlot(AssociatedInteractiveObject, interactiveObjectActionPlayerSystem, ref SKillSlotUIPositionInput,
                                                     InputID.FIRING_PROJECTILE_DOWN_HOLD);

            BuildSkillSlotForSubSkill(ref SKillSlotUIPositionInput, 0);
            this.SubSkillSlots.Add(new SkillSlot(AssociatedInteractiveObject, interactiveObjectActionPlayerSystem, ref SKillSlotUIPositionInput, InputID.SKILL_1_DOWN_HOLD));
            BuildSkillSlotForSubSkill(ref SKillSlotUIPositionInput, 1);
            this.SubSkillSlots.Add(new SkillSlot(AssociatedInteractiveObject, interactiveObjectActionPlayerSystem, ref SKillSlotUIPositionInput, InputID.SKILL_2_DOWN_HOLD));
            BuildSkillSlotForSubSkill(ref SKillSlotUIPositionInput, 2);
            this.SubSkillSlots.Add(new SkillSlot(AssociatedInteractiveObject, interactiveObjectActionPlayerSystem, ref SKillSlotUIPositionInput, InputID.SKILL_3_DOWN_HOLD));
        }
Example #6
0
        public PlayerDashActionStateBehavior(PlayerDashActionStateBehaviorInputDataSystemDefinition PlayerDashActionStateBehaviorInputDataSystemDefinition,
                                             InteractiveObjectActionPlayerSystem InteractiveObjectActionPlayerSystem,
                                             PlayerObjectInteractiveObjectActionStateManagerCallbacks_PlayerDashDirectionCallbacks PlayerObjectInteractiveObjectActionStateManagerCallbacks_PlayerDashDirectionCallbacks)
        {
            this._playerDashActionStateBehaviorInputDataSystemDefinition = PlayerDashActionStateBehaviorInputDataSystemDefinition;
            this.PlayerDashTargetPositionTrackerSystem = new PlayerDashTargetPositionTrackerSystem();

            base.StateManagersLookup = new Dictionary <PlayerDashActionState, APlayerDashActionStateManager>()
            {
                { PlayerDashActionState.LISTENING, new PlayerDashActionListeningStateManager(this) },
                {
                    PlayerDashActionState.DASH_DIRECTION, new PlayerDashDirectionActionStateManager(this, InteractiveObjectActionPlayerSystem,
                                                                                                    this._playerDashActionStateBehaviorInputDataSystemDefinition, ref PlayerDashTargetPositionTrackerSystem, PlayerObjectInteractiveObjectActionStateManagerCallbacks_PlayerDashDirectionCallbacks)
                }
            };

            base.Init(PlayerDashActionState.LISTENING);
        }
Example #7
0
 public FiringInteractiveObjectActionStateBehavior(GameInputManager gameInputManager, InteractiveObjectActionPlayerSystem interactiveObjectActionPlayerSystem,
                                                   InteractiveObjectActionInherentData firingInteractiveObjectActionInherentData)
 {
     this._aimingInteractiveObjectActionStateBehaviorInputDataSystem = new AimingInteractiveObjectActionStateBehaviorInputDataSystem(
         gameInputManager, interactiveObjectActionPlayerSystem, firingInteractiveObjectActionInherentData);
     this.StateManagersLookup = new Dictionary <AimingInteractiveObjectActionState, AAimingInteractiveObjectActionStateManager>()
     {
         { AimingInteractiveObjectActionState.LISTENING, new ListeningAimingInteractiveObjectActionStateManager(this, ref this._aimingInteractiveObjectActionStateBehaviorInputDataSystem) },
         { AimingInteractiveObjectActionState.AIMING, new AimingAimingInteractiveObjectActionStateManager(this) }
     };
     base.Init(AimingInteractiveObjectActionState.LISTENING);
 }