Sign in to follow this  

Understanding the on method in Phaser 3

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?





Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.