plugin(plugin, parameter) → {Phaser.Plugin}
Add a new Plugin into the PluginManager.
The Plugin must have 2 properties: game
and parent
. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
plugin | object | Phaser.Plugin | The Plugin to add into the PluginManager. This can be a function or an existing object. | |
parameter | * | <repeatable> | Additional parameters that will be passed to the Plugin.init method. |
Returns
The Plugin that was added to the manager.
- Source code: gameobjects/GameObjectFactory.js (Line 574)
Please login to continue.