PluginManager#add()

add(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 arguments that will be passed to the Plugin.init method.

Returns

The Plugin that was added to the manager.

Source code: core/PluginManager.js (Line 44)
doc_phaser
2017-02-14 11:05:09
Comments
Leave a Comment

Please login to continue.