Level H Engine
Timer.h
Go to the documentation of this file.
1 #pragma once
2 
6 class Timer
7 {
8 public:
13  Timer(float inTimerLength);
14 
18  ~Timer();
19 
24  void upadateTimer(float dt);
25 
29  void resetTimer();
30 
34  void setTimerLength(float inTimerLength);
35 
36 
40  void resetTimerLength(float inTimerLength);
41 
46  bool checkTimer();
47 
48 private:
50  float timer;
52  float timerLength;
54  bool finished;
55 };
void upadateTimer(float dt)
Updates the timer using the delta time.
Definition: Timer.cpp:12
Handles timer functions.
Definition: Timer.h:6
Timer(float inTimerLength)
Constructs the timer object.
Definition: Timer.cpp:3
void setTimerLength(float inTimerLength)
Changes the timer length.
Definition: Timer.cpp:40
bool finished
A boolean for if the timer has finished.
Definition: Timer.h:54
void resetTimerLength(float inTimerLength)
Change the timer length and reset the timer.
Definition: Timer.cpp:31
float timer
The current time in the timer.
Definition: Timer.h:50
float timerLength
The length of the timer.
Definition: Timer.h:52
void resetTimer()
Resets the timer to 0.
Definition: Timer.cpp:23
~Timer()
Destructs the timer object.
Definition: Timer.cpp:8
bool checkTimer()
Returns if the timer has finished or not.
Definition: Timer.cpp:46