![]() |
rag
graphic 2d engine
|
Provides time-related functionality. More...
#include <Timer.h>
Public Member Functions | |
void | start (float time, bool loop=false) |
Starts the Timer with a fixed amount of time. | |
float | getDelta (Ease::EaseType easetype=Ease::linear_01) |
Returns the time elapsed since the start interpolated between 0 and 1. More... | |
bool | finished () |
True if the timer has been running for the time specified at the start or more. Only valid for non-loop operation mode. | |
bool | running () |
True if the timer is running. | |
void | reset () |
Reset stops the timer and puts it in the same state it was before start running. | |
Static Public Attributes | |
static float | deltaTime = 0 |
Stores the elapsed time from frame to frame (use at your convenience). | |
static float | totalTime = 0 |
Stores total time since app starts. | |
static float | timeFactor = 1.0f |
Factor shared by which all Timer instances. | |
Provides time-related functionality.
float Timer::getDelta | ( | Ease::EaseType | easetype = Ease::linear_01 | ) |
Returns the time elapsed since the start interpolated between 0 and 1.
The interpolated value can use any curve, for convenience exposed in this function.