// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "StatusEffect.generated.h" /** * */ UCLASS(Abstract, Blueprintable) class THE_TWILIGHT_ABYSS_API UStatusEffect : public UObject { GENERATED_BODY() public: UPROPERTY(EditAnywhere, BlueprintReadWrite) FString Name; UPROPERTY(EditAnywhere, BlueprintReadWrite) FString Description; UPROPERTY(EditAnywhere, BlueprintReadWrite) bool IsForCombatOnly = false; UPROPERTY(EditAnywhere, BlueprintReadWrite) float BaseDuration; UPROPERTY(EditAnywhere, BlueprintReadWrite) UTexture2D* Icon; UFUNCTION() virtual void Invoke(AActor* Character, float TimeOfExpiry); UFUNCTION() virtual void OnExpiry(AActor* Character); UFUNCTION() virtual void OnPlayerTurn(AActor* Character, AActor* Enemy); UFUNCTION() virtual void OnEnemyTurn(AActor* Enemy, AActor* Character); UFUNCTION() virtual void OnStatusEffectAdd(AActor* Character); UFUNCTION() virtual void TickDown(AActor* Character); protected: UPROPERTY() FTimerHandle ExpiryTimerHandle; UFUNCTION() void CheckForExpiry(float TimeOfExpiry, AActor* Character); FDelegateHandle OnPlayerTurnDelegateHandle; FDelegateHandle OnEnemyTurnDelegateHandle; };