Source Academy Modules
    Preparing search index...

    Function add_listener

    • 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

      Parameters

      • obj: GameObject

        object to be added to

      • event: string

        the event name

      • callback: Function

        listener function, executed on event

      Returns GameObject | undefined

      listener game object