GASATHON/Project/Source/Gasa/AbilitySystem/GasaEffectActor.h

60 lines
1.8 KiB
C
Raw Normal View History

2024-04-13 16:29:25 -07:00
#pragma once
#include "GasaCommon.h"
#include "Actors/GasaActor.h"
#include "GameFramework/Actor.h"
2024-04-13 16:29:25 -07:00
#include "GasaEffectActor.generated.h"
2024-04-22 09:01:30 -07:00
2024-04-24 08:48:07 -07:00
UENUM(BlueprintType)
enum class EEffectUsagePolicy : uint8
{
None = 0 UMETA(Hidden),
ApplyOnOverlap = bit(0),
ApplyOnEndOverlap = bit(1),
RemoveOnOverlap = bit(3),
RemoveOnEndOverlap = bit(4),
};
constexpr int32 DefaultEffectUsagePolicy = (int32(EEffectUsagePolicy::RemoveOnEndOverlap));
2024-04-24 08:48:07 -07:00
2024-04-13 16:29:25 -07:00
UCLASS()
class GASA_API AGasaEffectActor : public AGasaActor
2024-04-13 16:29:25 -07:00
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects")
2024-04-24 07:59:48 -07:00
TSubclassOf<UGameplayEffect> InstantEffectClass;
2024-04-24 08:48:07 -07:00
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects", meta=(Bitmask, BitmaskEnum = EEffectUsagePolicy))
int32 InstantEffectUsage;
2024-04-24 07:59:48 -07:00
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects")
TSubclassOf<UGameplayEffect> DurationEffectClass;
2024-04-13 16:29:25 -07:00
2024-04-24 08:48:07 -07:00
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects", meta=(Bitmask, BitmaskEnum = EEffectUsagePolicy))
int32 DurationEffectUsage;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects")
TSubclassOf<UGameplayEffect> InfiniteEffectClass;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects", meta=(Bitmask, BitmaskEnum = EEffectUsagePolicy))
int32 InfiniteEffectUsage;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Effects")
bool bDestroyOnEffectRemoval = false;
2024-04-13 16:29:25 -07:00
AGasaEffectActor();
UFUNCTION(BlueprintCallable, Category = "Gameplay Effects")
void ApplyEffectToActor(AActor* Actor, TSubclassOf<UGameplayEffect> EffectClass );
2024-04-24 08:48:07 -07:00
UFUNCTION(BlueprintCallable)
void OnOverlap(AActor* Actor);
UFUNCTION(BlueprintCallable)
void OnEndOverlap(AActor* Actor);
2024-04-16 14:18:06 -07:00
};