@rhythmcoder wrote:
Hi.
I am a newbie in cocos2d-x.I know the way of set tile GID value.
And I also know the coordinate of Player and GID value of the coordinate.My question is, How to find closest distance compared with one specific coordinate.
For example, '1' is the player's coordinate, '2' is the feed of player's coordinate.
0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 2 0
0 0 0 0 0 0 0 0 0 0
0 2 0 0 0 2 0 0 0 0
0 0 0 2 0 0 0 0 0 0
0 0 0 0 0 0 0 2 0 0
0 0 0 0 0 0 0 0 0 0How to find closest 2 coordinate compared with 1?
Is there any specific function in cocos2d-x to apply this?
Posts: 2
Participants: 2