29 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
35 float GetPatternSelectionScore(FName PatternRowName)
const;
36 bool TrySelectPattern(FName PatternRowName);
38 bool TrySelectPriorityPattern(
float DistanceToTarget);
39 bool CancelSelectedPattern();
41 float ConsumePatternRecovery();
42 bool CanStartPhaseTransition()
const;
44 bool CompletePhaseTransition(int32 TargetPhase);
45 bool IsPatternRunning()
const;
58 return FindPriorityPatternRule(DistanceToTarget) != INDEX_NONE;
66 bool CanSelectPattern(
const FGameplayTag& PatternTag,
bool bIgnoreRecentPatterns =
false)
const;
67 FGameplayAbilitySpec* FindPatternSpec(
const FGameplayTag& PatternTag)
const;
69 int32 FindPriorityPatternRule(
float DistanceToTarget)
const;
73 void OnSelectedAttackEnded(
const FAbilityEndedData& EndedData);
74 void OnHealthChanged(
const FOnAttributeChangeData& Data);
75 void UpdatePendingPhase(
float Health);
77 void UnbindSelectedAbility();
82 UPROPERTY(Transient, VisibleAnywhere, meta = (AllowPrivateAccess =
"true"))
86 bool bPriorityPatternSelected = false;
89 float PendingRecoveryDuration = 0.0f;
92 TArray<FGameplayTag> RecentPatterns;
94 TWeakObjectPtr<UAbilitySystemComponent> AbilitySystemComponent;
98 int32 CurrentPhase = 1;
100 int32 PendingPhase = INDEX_NONE;
102 FGameplayAbilitySpecHandle SelectedAbilityHandle;
103 FDelegateHandle AttackStartedDelegateHandle;
104 FDelegateHandle AttackEndedDelegateHandle;
105 FDelegateHandle HealthChangedDelegateHandle;