@modoki/engine / index / TimeManager
Interface: TimeManager
Public surface of the timeManager singleton — event anchors and derived reads over the pause-aware engine clock. See the module doc above.
Extends
Managers
actions?
optionalactions?:Record<string,UIActionDef|UIActionHandler>
Named UIAction handlers owned by this manager (same shape systems use). Registered on activate, removed on deactivate.
Inherited from
deltaTime
readonlydeltaTime:number
Current frame delta (seconds), pause- and timeScale-aware.
games?
optionalgames?:string[]
Game scope only: active-game ids to match; omit = every game.
Inherited from
name
name:
string
Inherited from
scenes?
optionalscenes?:string[]
Scene scope only: path substrings to match; omit = every scene.
Inherited from
scope?
optionalscope?:ManagerScope
Default 'scene'.
Inherited from
timeSinceGameStart
readonlytimeSinceGameStart:number
Seconds since the game (session) started, or since the last editor Play.
timeSinceSceneLoad
readonlytimeSinceSceneLoad:number
Seconds since the current scene finished loading.
dispose()?
optionaldispose(ctx?):void
ctx carries the world the manager was operating against (on a scene swap this is the OLD world, still alive until just after dispose runs) so a dispose can tear down world-bound state on the correct world. Optional.
Parameters
ctx?
Returns
void
Inherited from
init()?
optionalinit(ctx):void|Promise<void>
Parameters
ctx
Returns
void | Promise<void>
Inherited from
mark()
mark(
name):void
Stamp a named anchor at the current elapsed time.
Parameters
name
string
Returns
void
timeSince()
timeSince(
name):number
Seconds since a named anchor was stamped (0 if never stamped).
Parameters
name
string
Returns
number