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