melonJS
    Preparing search index...

    Function register

    • Register a plugin.

      Parameters

      • pluginClass: new (...args: any[]) => BasePlugin

        Plugin class to instantiate and register

      • Optionalname: string

        a unique name for this plugin

      • ...args: any[]

        all extra parameters will be passed to the plugin constructor

      Returns void

      // register a new plugin
      me.plugin.register(TestPlugin, "testPlugin");
      // the `testPlugin` class instance can also be accessed through me.plugin.cache
      me.plugin.cache.testPlugin.myfunction ();