Jump to content

up event is not fired properly


dpxcc
 Share

Recommended Posts

I'm working on a mobile game with a virtual joystick, similar to the one in Phaser Examples. (http://phaser.io/examples/v2/input/virtual-gamecontroller)

I find that up event is only fired when the down event happens on the same sprite. This leads to very strange behavior, as you can see in that example:

You click down on the background, and move to the left button (your character starts moving), then you release the click (your character will keep moving)...

Link to comment
Share on other sites

If you just copied that example code directly, the problem is that the code is activating the buttons during onInputOver events.

Find the lines that contain:

events.onInputOver

And make sure they aren't activating the respective button's ability.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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