Jump to content

onInputDown issue with sprite layers


TonyB
 Share

Recommended Posts

Forgive me ahead of time if I miss the obvious. I have been working on a whack-a-mole style game recently and chose Phaser for creating this game. I came across an issue with the 'onInputDown' event that I have applied to a sprite hiding behind another sprite. Basically a person that pops up behind a desk and you whack them with your mouse or touch on a mobile screen. The issue is that I can click on the desk on the layer above the sprite and the 'onInputDown' event triggers.

 

I have searched the forums and online documentation and just can't seem to find any related issue or solution to work from. I am assuming I will kick myself once I find the answer, but any help would be appreciated. So far this platform has been pretty impressive, but I am also coming from a Flash/Actionscript background and this sort of issue isn't a problem in flash.

 

Thanks from a newbie to Phaser!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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