File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,4 +174,41 @@ PluginCache.removeCustom = function (key)
174174 }
175175} ;
176176
177+ /**
178+ * Removes all Core Plugins.
179+ *
180+ * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.
181+ * So be sure you only call this if you do not wish to run Phaser again.
182+ *
183+ * @method Phaser.Plugins.PluginCache.destroyCorePlugins
184+ * @since 3.12.0
185+ */
186+ PluginCache . destroyCorePlugins = function ( )
187+ {
188+ for ( var key in corePlugins )
189+ {
190+ if ( corePlugins . hasOwnProperty ( key ) )
191+ {
192+ delete corePlugins [ key ] ;
193+ }
194+ }
195+ } ;
196+
197+ /**
198+ * Removes all Custom Plugins.
199+ *
200+ * @method Phaser.Plugins.PluginCache.destroyCustomPlugins
201+ * @since 3.12.0
202+ */
203+ PluginCache . destroyCustomPlugins = function ( )
204+ {
205+ for ( var key in customPlugins )
206+ {
207+ if ( customPlugins . hasOwnProperty ( key ) )
208+ {
209+ delete customPlugins [ key ] ;
210+ }
211+ }
212+ } ;
213+
177214module . exports = PluginCache ;
You can’t perform that action at this time.
0 commit comments