SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
TimeManager Class Reference

Manages the timing and delta time for the game. More...

#include <TimeManager.h>

Static Public Member Functions

static float GetDeltaTime ()
 Retrieves the delta time.
 
static float GetTime ()
 Retrieves the current time.
 

Private Member Functions

 TimeManager (const TimeManager &)=delete
 
TimeManageroperator= (const TimeManager &)=delete
 
void privDelete ()
 
void privProcessTime ()
 
float privGetDeltaTime ()
 
float privGetTime ()
 

Static Private Member Functions

static TimeManagerInstance ()
 
static void Delete ()
 Deletes the TimeManager instance.
 
static void ProcessTime ()
 Processes the time by updating the current and delta time.
 

Private Attributes

float currentTime
 The current time.
 
float deltaTime
 The delta time.
 
float previousTime
 The previous time for calculating delta time.
 
FreezeTimefrzTime
 Pointer to the FreezeTime object.
 

Static Private Attributes

static TimeManagerptrInstance = nullptr
 

Friends

class TimeManagerAttorney
 

Detailed Description

Manages the timing and delta time for the game.

The TimeManager class is responsible for managing the timing and delta time for the game. It provides methods to get the current time and delta time, and processes the time each frame. It follows the Singleton design pattern.

Member Function Documentation

◆ GetDeltaTime()

static float TimeManager::GetDeltaTime ( )
inlinestatic

Retrieves the delta time.

Returns
The delta time.
Here is the caller graph for this function:

◆ GetTime()

static float TimeManager::GetTime ( )
inlinestatic

Retrieves the current time.

Returns
The current time.
Here is the caller graph for this function:

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