-
Notifications
You must be signed in to change notification settings - Fork 0
/
SActionEffect.h
44 lines (30 loc) · 923 Bytes
/
SActionEffect.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "SAction.h"
#include "SActionEffect.generated.h"
/**
*
*/
UCLASS()
class ACTIONROGUELIKE_API USActionEffect : public USAction
{
GENERATED_BODY()
public:
void StartAction_Implementation(AActor* Instigator) override;
void StopAction_Implementation(AActor* Instigator) override;
protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Effect")
float Duration;
/* Time between 'ticks' to apply effect */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Effect")
float Period;
FTimerHandle PeriodHandle;
FTimerHandle DurationHandle;
UFUNCTION(BlueprintNativeEvent, Category = "Effect")
void ExecutePeriodicEffect(AActor* Instigator);
public:
UFUNCTION(BlueprintCallable, Category = "Action")
float GetTimeRemaining() const;
USActionEffect();
};