Esempio n. 1
0
        public override EGoalStatus Update(float inDeltaTime)
        {
            if (_target == null || _attack == null || _targetState == null)
            {
                return(EGoalStatus.Failed);
            }

            if (_targetState.IsActionStateActiveOnTrack(EActionStateMachineTrack.Locomotion, EActionStateId.Dead))
            {
                return(EGoalStatus.Completed);
            }

            if (_attack.CanAttack(_target))
            {
                _attack.Attack(_target);
            }

            return(EGoalStatus.InProgress);
        }
 private bool InLocomotion(IActionStateMachineInterface inActionStateMachineInterface)
 {
     return(inActionStateMachineInterface != null &&
            inActionStateMachineInterface.IsActionStateActiveOnTrack(EActionStateMachineTrack.Locomotion,
                                                                     EActionStateId.Locomotion));
 }