Class
TimePlugin
View sourceExtendsPlugin
Adds virtual time and timer progression to an App.
TimePlugin provides a fresh VirtualClock resource and
advances Timer components from the clock’s current frame duration.
This gives application code one shared, controllable source of virtual time.
The plugin depends on CorePlugin and ReflectPlugin.
Register both before TimePlugin; plugin dependencies are checked
but are not installed automatically.
Examples
import { App } from '@wimaengine/app'
import { CorePlugin } from '@wimaengine/core'
import { ReflectPlugin } from '@wimaengine/reflect'
import { TimePlugin } from '@wimaengine/time'
new App()
.registerPlugin(new ReflectPlugin())
.registerPlugin(new CorePlugin())
.registerPlugin(new TimePlugin())
.run()Constructor
Methods
register(app: App): void
View sourceInstalls the app’s VirtualClock and connects timer progression to
the app’s virtual time.
requires(): TypeId[]
View sourceReturns the plugin IDs required by TimePlugin.
Register CorePlugin and ReflectPlugin before this
plugin. Registering TimePlugin does not install them
automatically.
