Level H Engine
Public Member Functions | Private Attributes | List of all members
Timer Class Reference

Handles timer functions. More...

#include <Timer.h>

Collaboration diagram for Timer:
Collaboration graph

Public Member Functions

 Timer (float inTimerLength)
 Constructs the timer object. More...
 
 ~Timer ()
 Destructs the timer object. More...
 
void upadateTimer (float dt)
 Updates the timer using the delta time. More...
 
void resetTimer ()
 Resets the timer to 0. More...
 
void setTimerLength (float inTimerLength)
 Changes the timer length. More...
 
void resetTimerLength (float inTimerLength)
 Change the timer length and reset the timer. More...
 
bool checkTimer ()
 Returns if the timer has finished or not. More...
 

Private Attributes

float timer
 The current time in the timer. More...
 
float timerLength
 The length of the timer. More...
 
bool finished
 A boolean for if the timer has finished. More...
 

Detailed Description

Handles timer functions.

Constructor & Destructor Documentation

◆ Timer()

Timer::Timer ( float  inTimerLength)

Constructs the timer object.

Parameters
floatthe length of the timer.
Here is the call graph for this function:

◆ ~Timer()

Timer::~Timer ( )

Destructs the timer object.

Member Function Documentation

◆ checkTimer()

bool Timer::checkTimer ( )

Returns if the timer has finished or not.

Returns
If the timer has finished.
Here is the caller graph for this function:

◆ resetTimer()

void Timer::resetTimer ( )

Resets the timer to 0.

Here is the caller graph for this function:

◆ resetTimerLength()

void Timer::resetTimerLength ( float  inTimerLength)

Change the timer length and reset the timer.

Here is the call graph for this function:

◆ setTimerLength()

void Timer::setTimerLength ( float  inTimerLength)

Changes the timer length.

◆ upadateTimer()

void Timer::upadateTimer ( float  dt)

Updates the timer using the delta time.

Parameters
dtThe delta time.
Here is the caller graph for this function:

Member Data Documentation

◆ finished

bool Timer::finished
private

A boolean for if the timer has finished.

◆ timer

float Timer::timer
private

The current time in the timer.

◆ timerLength

float Timer::timerLength
private

The length of the timer.


The documentation for this class was generated from the following files: