int GetObs(int x, int y)
Returns the index of the obstruction tile at the given coords.
Note: Coordinates are in terms of tiles, not pixels. In order to convert tiles to pixels do, (pixel coordinate / 16).
// Imagine the following 3 by 3 grid is your map. // 0 1 2 // // 0 0 0 0 // 1 0 1 1 // 2 0 0 1 GetObs(0, 0); // Returns 0. GetObs(1, 1); // Returns 1. GetObs(2, 2); // Returns 1. GetObs(2, 0); // Returns 0.
There are no talkbacks on this documentation page yet. Post the first?
Doc Nav |
Your docs |