Jump to content

Click on icon with active pointer


frokenstein
 Share

Recommended Posts

What is the simplest way to do this?

 

Right now I am binding a function whenever the mouse is clicked:

game.input.onDown.add(this.clickOnItem, this);

This function figures out the x,y location of the click but what is the easiest way to determine if it is above a particular icon? Do I need to write an overlap function for every single icon it may overlap/collide with?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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