rag
graphic 2d engine
Public Member Functions | Static Public Attributes | List of all members
rag::Timer Class Reference

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.
 

Detailed Description

Provides time-related functionality.

Member Function Documentation

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.


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