Static method called directly by the Core internal Plugins. Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) Plugin is the object to instantiate to create the plugin Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)
name | type | arguments | Default | description |
---|---|---|---|---|
key | string |
A reference used to get this plugin from the plugin cache. |
||
plugin | function |
The plugin to be stored. Should be the core object, not instantiated. |
||
mapping | string |
If this plugin is to be injected into the Scene Systems, this is the property key map used. |
||
custom | boolean | <optional> | false |
Core Scene plugin or a Custom Scene plugin? |
Stores a custom plugin in the global plugin cache. The key must be unique, within the scope of the cache.
name | type | description |
---|---|---|
key | string |
A reference used to get this plugin from the plugin cache. |
plugin | function |
The plugin to be stored. Should be the core object, not instantiated. |
mapping | string |
If this plugin is to be injected into the Scene Systems, this is the property key map used. |
data | any |
A value to be passed to the plugin's |
Checks if the given key is already being used in the core plugin cache.
name | type | description |
---|---|---|
key | string |
The key to check for. |
true
if the key is already in use in the core cache, otherwise false
.
Checks if the given key is already being used in the custom plugin cache.
name | type | description |
---|---|---|
key | string |
The key to check for. |
true
if the key is already in use in the custom cache, otherwise false
.
Returns the core plugin object from the cache based on the given key.
name | type | description |
---|---|---|
key | string |
The key of the core plugin to get. |
The core plugin object.
Returns the custom plugin object from the cache based on the given key.
name | type | description |
---|---|---|
key | string |
The key of the custom plugin to get. |
The custom plugin object.
Returns an object from the custom cache based on the given key that can be instantiated.
name | type | description |
---|---|---|
key | string |
The key of the custom plugin to get. |
The custom plugin object.
Removes a core plugin based on the given key.
name | type | description |
---|---|---|
key | string |
The key of the core plugin to remove. |
Removes a custom plugin based on the given key.
name | type | description |
---|---|---|
key | string |
The key of the custom plugin to remove. |
Removes all Core Plugins.
This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. So be sure you only call this if you do not wish to run Phaser again.
Removes all Custom Plugins.