-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClockTimeActor.h
56 lines (44 loc) · 3.13 KB
/
ClockTimeActor.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
// Alberto García Izquierdo - 2018
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Runtime/Engine/Classes/Components/DirectionalLightComponent.h"
#include "ClockTimeActor.generated.h"
UCLASS()
class MYPROJECT_API AClockTimeActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AClockTimeActor();
// VARIABLES
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Time Parameters")
float _dayLenght;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Time Parameters")
float _timerDelay;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Time Parameters")
float _gradesPerSecond;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Time Parameters")
int _minutes;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Time Parameters")
int _hours;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
/*UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Light Setup")
UDirectionalLightComponent* _sunLight;*/
FTimerHandle _myTimeHandle;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Time Parameters")
float _grades;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Time Parameters")
float _totalSeconds;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UFUNCTION()
const float DayLenght(float dayLenght);
UFUNCTION()
float GradesPerSecond(float dayLenght);
UFUNCTION()
void ClockFunction();
};