|
Platformer
Platformer
|
Manages the time and framerate for our game. More...
#include <TimeManager.hpp>

Public Member Functions | |
| void | StablizeFramerate () |
| Stabilizes the framerate of the game by calling SDL_Delay. | |
| TimeManager (const TimeManager &)=delete | |
| Stop the compiler from generating methods to copy the object. | |
| TimeManager & | operator= (const TimeManager &)=delete |
| Stop the compiler from generating methods to copy the object. | |
Static Public Member Functions | |
| static TimeManager & | instance () |
| The singleton instance of the TimeManager. | |
| static unsigned int | DeltaTime () |
Private Member Functions | |
| TimeManager () | |
| Constructs a TimeManager. | |
| ~TimeManager () | |
| Destructs a TimeManager. | |
Private Attributes | |
| unsigned int | lastTick_ = 0 |
| The last update tick for stabilizing the framerate. | |
| unsigned int | lastDelta_ = 0 |
| The change in time based on the last update tick. | |
| unsigned int | TICKS_PER_FRAME = 16 |
| The ticks per frame for stabilizing the framerate. | |
Manages the time and framerate for our game.
1.8.14