Changed OnComboAction to OnUnhandledAction, and made it only broadcast if the event is not already handled by a Blueprint event node.

This commit is contained in:
Jamie Greunbaum 2023-09-19 16:32:04 -04:00
parent fc3f597dcd
commit df1df9a56f
2 changed files with 5 additions and 2 deletions

View File

@ -147,6 +147,9 @@ void UComboManagerComponent::BroadcastDelegates(const UComboAction *ComboAction,
{ {
Binding->Execute(ComboAction, TriggerEvent); Binding->Execute(ComboAction, TriggerEvent);
} }
this->OnComboAction.Broadcast(ComboAction, (TriggerEvent == EComboActionTriggerEvent::Activated) ? true : false); else
{
this->OnUnhandledAction.Broadcast(ComboAction, (TriggerEvent == EComboActionTriggerEvent::Activated) ? true : false);
}
this->LastComboAction = ComboAction; this->LastComboAction = ComboAction;
} }

View File

@ -75,7 +75,7 @@ protected:
TMap<TObjectPtr<const class UComboInputAsset>, float> DEBUG__UnlockTimers; TMap<TObjectPtr<const class UComboInputAsset>, float> DEBUG__UnlockTimers;
UPROPERTY(BlueprintReadWrite, BlueprintAssignable) UPROPERTY(BlueprintReadWrite, BlueprintAssignable)
FComboActionHandlerDelegate OnComboAction; FComboActionHandlerDelegate OnUnhandledAction;
private: private:
void ActivateComboAction(const class UComboInputAsset *Input); void ActivateComboAction(const class UComboInputAsset *Input);