Interface: Plugin
A Plugin is code that can be registered to run at certain points in the game loop.
Properties
afterUpdate()?
optionalafterUpdate: (game,deltaTime) =>void
Plugin code run after the frame update, but before the frame draw.
Parameters
• game: Game
• deltaTime: number
Returns
void
Defined in
m2c2kit/packages/core/src/Plugin.ts:18
beforeUpdate()?
optionalbeforeUpdate: (game,deltaTime) =>void
Plugin code run before the frame update, but before the frame draw.
Parameters
• game: Game
• deltaTime: number
Returns
void
Defined in
m2c2kit/packages/core/src/Plugin.ts:16
disabled?
optionaldisabled:boolean
Is the plugin disabled and not to be run? Default is false.
Remarks
Disabled plugins will still be initialized.
Defined in
m2c2kit/packages/core/src/Plugin.ts:14
id
id:
string
Short identifier of the plugin.
Defined in
m2c2kit/packages/core/src/Plugin.ts:8
initialize()?
optionalinitialize: (game) =>Promise<void>
Initialization code run when the plugin is registered with the game.
Parameters
• game: Game
Returns
Promise<void>
Defined in
m2c2kit/packages/core/src/Plugin.ts:12
type
type:
"Game"|"Survey"|"Session"
What kind of m2c2kit object does the plugin work with?
Defined in
m2c2kit/packages/core/src/Plugin.ts:10