RealtimeStyleTransferRuntime/Source/LyraGame/Interaction/IInteractableTarget.h

52 lines
1.3 KiB
C
Raw Permalink Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Abilities/GameplayAbility.h"
#include "InteractionOption.h"
#include "IInteractableTarget.generated.h"
struct FInteractionQuery;
/** */
class FInteractionOptionBuilder
{
public:
FInteractionOptionBuilder(TScriptInterface<IInteractableTarget> InterfaceTargetScope, TArray<FInteractionOption>& InteractOptions)
: Scope(InterfaceTargetScope)
, Options(InteractOptions)
{
}
void AddInteractionOption(const FInteractionOption& Option)
{
FInteractionOption& OptionEntry = Options.Add_GetRef(Option);
OptionEntry.InteractableTarget = Scope;
}
private:
TScriptInterface<IInteractableTarget> Scope;
TArray<FInteractionOption>& Options;
};
/** */
UINTERFACE(MinimalAPI, meta = (CannotImplementInterfaceInBlueprint))
class UInteractableTarget : public UInterface
{
GENERATED_BODY()
};
/** */
class IInteractableTarget
{
GENERATED_BODY()
public:
/** */
virtual void GatherInteractionOptions(const FInteractionQuery& InteractQuery, FInteractionOptionBuilder& OptionBuilder) = 0;
/** */
virtual void CustomizeInteractionEventData(const FGameplayTag& InteractionEventTag, FGameplayEventData& InOutEventData) { }
};