melonJS
    Preparing search index...

    Function patch

    • patch a melonJS function

      Parameters

      • proto: Record<string, any>

        target object

      • name: string

        target function

      • fn: (...args: any[]) => any

        replacement function

      Returns void

      // redefine the app.update function with a new one
      me.plugin.patch(app, "update", function () {
      // display something in the console
      console.log("duh");
      // call the original app.update function
      this._patched();
      });