hx3d  1
2D/3D Simple Game Framework
Public Member Functions | List of all members
hx3d::Timer Class Reference

Simple timer. More...

#include <timer.hpp>

Public Member Functions

 Timer ()
 Create an uninitialized timer. See initialize.
 
 Timer (long delay, bool loop=false)
 Create a timer with a delay as milliseconds. More...
 
void initialize (long delay, bool loop=false)
 Initialize the timer with a delay. More...
 
void reset ()
 Reset the timer.
 
long remaining ()
 Get the remaining time as milliseconds. More...
 
bool hasEnded ()
 Test if the timer has ended. More...
 
void update (float delta)
 Update the timer.
 
bool isLooping ()
 Is the timer looping ? More...
 

Detailed Description

Simple timer.

Definition at line 31 of file timer.hpp.

Constructor & Destructor Documentation

hx3d::Timer::Timer ( long  delay,
bool  loop = false 
)

Create a timer with a delay as milliseconds.

Parameters
delayDelay
loopLoop ?

Definition at line 30 of file timer.cpp.

Member Function Documentation

bool hx3d::Timer::hasEnded ( )

Test if the timer has ended.

Returns
True/False

Definition at line 58 of file timer.cpp.

void hx3d::Timer::initialize ( long  delay,
bool  loop = false 
)

Initialize the timer with a delay.

Parameters
delayDelay
loopLoop ?

Definition at line 34 of file timer.cpp.

bool hx3d::Timer::isLooping ( )

Is the timer looping ?

Returns
True/False

Definition at line 54 of file timer.cpp.

long hx3d::Timer::remaining ( )

Get the remaining time as milliseconds.

Returns
milliseconds

Definition at line 46 of file timer.cpp.


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