/
OpenDoorTimelineCurve.h
56 lines (42 loc) · 1.02 KB
/
OpenDoorTimelineCurve.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
46
47
48
49
50
51
52
53
54
55
56
// Harrison McGuire
// UE4 Version 4.20.2
// https://github.com/Harrison1/unrealcpp
// https://severallevels.io
// https://harrisonmcguire.com
#pragma once
#include "GameFramework/Actor.h"
#include "OpenDoorTimelineCurve.generated.h"
class UBoxComponent;
class UTimelineComponent;
UCLASS()
class UNREALCPP_API AOpenDoorTimelineCurve : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AOpenDoorTimelineCurve();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere)
UStaticMeshComponent* Door;
UPROPERTY(EditAnywhere)
UStaticMeshComponent* DoorFrame;
UPROPERTY(EditAnywhere)
UCurveFloat* DoorCurve;
UFUNCTION()
void ControlDoor();
UFUNCTION()
void ToggleDoor();
UFUNCTION()
void SetState();
bool Open;
bool ReadyState;
float RotateValue;
float CurveFloatValue;
float TimelineValue;
UTimelineComponent* MyTimeline;
};