-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWotUserWidget.h
45 lines (33 loc) · 1.11 KB
/
WotUserWidget.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
45
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "WotUserWidget.generated.h"
// We make the class abstract, as we don't want to create
// instances of this, instead we want to create instances
// of our UMG Blueprint subclass.
UCLASS(Abstract)
class VOXELRPG_API UWotUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable)
void SetAttachTo(AActor* InAttachTo);
UFUNCTION(BlueprintCallable)
virtual void SetDuration(float NewDuration);
UFUNCTION(BlueprintCallable)
virtual void SetOffset(const FVector& NewOffset);
protected:
UFUNCTION(BlueprintCallable)
virtual void SetPosition(const FVector& NewPosition);
virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
void UpdatePosition();
UPROPERTY( EditAnywhere, BlueprintReadWrite )
float Duration{0.0f};
UPROPERTY( EditAnywhere, BlueprintReadWrite )
FVector Offset = FVector(0, 0, 0.0f);
TWeakObjectPtr<AActor> AttachTo;
UPROPERTY()
FTimerHandle TimerHandle_Remove;
UFUNCTION()
void Remove_TimeElapsed();
};