• Preparing search index...
  • The search index is not available
Source Academy Modules
  • Source Academy Modules
  • game
  • add_keyboard_listener

Function add_keyboard_listener

  • add_keyboard_listener(key, event, callback): GameObject
  • Attach a listener to the object. The callback will be executed when the event is emitted. Mutate the object.

    For all available events, see: https://photonstorm.github.io/phaser3-docs/Phaser.Input.Events.html

    For list of keycodes, see: https://github.com/photonstorm/phaser/blob/v3.22.0/src/input/keyboard/keys/KeyCodes.js

    Parameters

    • key: string | number

      keyboard key to trigger listener

    • event: string

      the event name

    • callback: Function

      listener function, executed on event

    Returns GameObject

    listener game object

    • Defined in bundles/game/functions.ts:1043

Settings

Member Visibility

Theme

Source Academy Modules
  • Loading...

Generated using TypeDoc