GameObjectFactory#plugin()

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)
doc_phaser
2017-02-14 10:48:44
Comments
Leave a Comment

Please login to continue.