AzureAbyss/Source/the_twilight_abyss/TurnBasedCombatV2/StatusEffect.h

54 lines
1.3 KiB
C
Raw Normal View History

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.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);
2023-02-27 17:32:34 +00:00
UFUNCTION()
virtual void OnPlayerTurn(AActor* Character, AActor* Enemy);
UFUNCTION()
virtual void OnEnemyTurn(AActor* Enemy, AActor* Character);
2023-02-27 17:32:34 +00:00
UFUNCTION()
virtual void OnStatusEffectAdd(AActor* Character);
UFUNCTION()
virtual void TickDown(AActor* Character);
2023-02-27 17:32:34 +00:00
protected:
UPROPERTY()
FTimerHandle ExpiryTimerHandle;
UFUNCTION()
void CheckForExpiry(float TimeOfExpiry, AActor* Character);
FDelegateHandle OnPlayerTurnDelegateHandle;
FDelegateHandle OnEnemyTurnDelegateHandle;
};