// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "AbilitySystem/Abilities/LyraGameplayAbility.h" #include "Containers/Array.h" #include "GameplayAbilitySpec.h" #include "Interaction/InteractionOption.h" #include "UObject/SoftObjectPtr.h" #include "UObject/UObjectGlobals.h" #include "LyraGameplayAbility_Interact.generated.h" class UIndicatorDescriptor; class UObject; class UUserWidget; struct FFrame; struct FGameplayAbilityActorInfo; struct FGameplayEventData; /** * ULyraGameplayAbility_Interact * * Gameplay ability used for character interacting */ UCLASS(Abstract) class ULyraGameplayAbility_Interact : public ULyraGameplayAbility { GENERATED_BODY() public: ULyraGameplayAbility_Interact(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); virtual void ActivateAbility(const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo, const FGameplayEventData* TriggerEventData) override; UFUNCTION(BlueprintCallable) void UpdateInteractions(const TArray& InteractiveOptions); UFUNCTION(BlueprintCallable) void TriggerInteraction(); protected: UPROPERTY(BlueprintReadWrite) TArray CurrentOptions; UPROPERTY() TArray> Indicators; protected: UPROPERTY(EditDefaultsOnly) float InteractionScanRate = 0.1f; UPROPERTY(EditDefaultsOnly) float InteractionScanRange = 500; UPROPERTY(EditDefaultsOnly) TSoftClassPtr DefaultInteractionWidgetClass; };