• Public
  • Public/Protected
  • All

Namespace Callback

Module used to handle callbacks. See Callbacks for details about the callback mechanism and the list of pre-defined callbacks




  • addCallback(name: string, func: Function): void
  • Adds callback function for the specified callback name. Most of native events can be prevented using Game.prevent call.


    • name: string

      callback name, should be one of the pre-defined or a custom name if invoked via Callback.invokeCallback

    • func: Function

      function to be called when an event occures

    Returns void


  • invokeCallback(name: string, o1?: any, o2?: any, o3?: any, o4?: any, o5?: any, o6?: any, o7?: any, o8?: any, o9?: any, o10?: any): void
  • Invokes callback with any name and up to 10 additional parameters. You should not generally call pre-defined callbacks until you really need to do so. If you want to trigger some event in your mode, use your own callback names


    • name: string

      callback name

    • Optional o1: any
    • Optional o2: any
    • Optional o3: any
    • Optional o4: any
    • Optional o5: any
    • Optional o6: any
    • Optional o7: any
    • Optional o8: any
    • Optional o9: any
    • Optional o10: any

    Returns void

Generated using TypeDoc