35 lines
828 B
C++
35 lines
828 B
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/DataAsset.h"
|
|
#include "GameplayTagContainer.h"
|
|
#include "DA_StateGatingTable.generated.h"
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct PG_FRAMEWORK_API FStateGatingRule
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
FGameplayTag ActionTag;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
FGameplayTag BlockedByState;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
bool bIsBlocked = true;
|
|
};
|
|
|
|
UCLASS(BlueprintType)
|
|
class PG_FRAMEWORK_API UDA_StateGatingTable : public UPrimaryDataAsset
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gating")
|
|
TArray<FStateGatingRule> GatingRules;
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Gating")
|
|
bool IsActionGated(FGameplayTag ActionTag, FGameplayTag CurrentState) const;
|
|
};
|