Java - Finding distance between player and tile in array

Posted by Corey on Game Development See other posts from Game Development or by Corey
Published on 2012-06-30T19:06:11Z Indexed on 2012/06/30 21:26 UTC
Read the original article Hit count: 173

Filed under:
|
|

What is the best way performance wise to do this? When I click a tile I want it to get the distance and if I am close enough I can interact with the tile. One way would be to find the tile by doing mouse / tile width when I click correct? But then how would I get that tiles position? I know how to find the distance I just don't know how to get a certain tiles position from the array when I click it

© Game Development or respective owner

Related posts about java

Related posts about tiles