Jump to content

Understanding the on method in Phaser 3


blackhawx
 Share

Recommended Posts

If I have the following in my game code...

 this.input.on('gameobjectup', this.clickHandler, this);

 

Is `gameobjectup` a pre-defined term that Phaser already understands, or is that a just a required label that I can rename as anything I want? 

If the former,  is there documentation online that tells us what other values we can use in it's place?

Thanks!

 

 

 

Link to comment
Share on other sites

It's an event, as defined in InputPlugin.js.  I don't believe all of the events are documented out, but if you take the time to go through the link, you'll find everything there (gameobjectdown, gameobjectout, gameobjectup, pointerdown, pointerup, pointermove, pointerover, pointerout, dragstart, dragover, dragleave, dragenter, drag, drop, and dragend).

But before you do that, I'd recommend you read through the Input Events tutorial in this Dev Log; I know it helped me understand the basics for configuring input options.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...