14#define TIMESOURCE_GAMEPLAY uint32_t('GPTS')
15#define TIMESOURCE_INPUT uint32_t('IPTS')
16#define TIMESOURCE_SYSTEM uint32_t('SYTS')
Managers are objects which care about some specific functionality of a feature.
Definition manager.h:32
Singleton object which manages all Game::TimeSource objects.
void OnBeginFrame() override
called before frame by the feature
Definition timemanager.cc:176
virtual __DeclareClass(TimeManager) __DeclareSingleton(TimeManager) public ~TimeManager()
Definition timemanager.cc:119
void OnDeactivate() override
called when removed from game server
Definition timemanager.cc:165
void OnActivate() override
Definition timemanager.cc:128
TimeSource *const CreateTimeSource(TimeSourceCreateInfo const &info)
create a timesource. The global time manager handles the timesources.
void SetGlobalTimeFactor(float factor)
set global time scale. This should be used sparingly. You can usually set individual time sources tim...
TimeSource *const GetTimeSource(uint32_t TIMESOURCE_HASH)
get a time source by hash
float GetGlobalTimeFactor()
get the global time scale
Game::EditorState.
Definition graphicsmanager.h:60
These are the standard time source objects provided by Application layer:
int Tick
the tick datatype (one tick == 1 millisecond)
Definition time.h:20
double Time
the time datatype
Definition time.h:18
#define __DeclareSingleton(type)
Definition osxsingleton.h:24
#define __DeclareClass(type)
Used to create a timesource.
Definition timemanager.h:26
uint32_t hash
time source hash number. Ex. 'ABC1'
Definition timemanager.h:28
An object that keeps track of running time and frame time (delta time).
float timeFactor
time factor for this time source
Definition timemanager.h:61
Timing::Time const time
total time this timesource has run for
Definition timemanager.h:55
int pauseCounter
increment this to pause time, decrement to continue running
Definition timemanager.h:59
Timing::Time const frameTime
delta time between this frame and last frame
Definition timemanager.h:53
Timing::Tick const ticks
number of ticks that this time source has run for
Definition timemanager.h:57
Typedefs for the Timing subsystem.