17place
The TilemapKit Roadmap is yours! All the ideas and discussions
3 votes Vote

TK: enumerate tiles in rectangle or radius (or all tiles)

Provide a safe way to enumerate tile GIDs in the C memory buffer. Most likely by implementing a version of enumerateTilesUsingBlock - although enumerating all tiles would be nice to be able to do with fast enumeration as well, it couldn't provide the tile's coordinates.

[tileLayer enumerateTilesUsingBlock:^(void)(TKTileGID tile, TKPoint coord) {
}];

[tileLayer enumerateTilesInRadius:10 center:TKPointMake(44, 17) usingBlock:^(void)(TKTileGID tile, TKPoint coord) {
}];

[tileLayer enumerateTilesInRectangle:CGRectMake(-5, -5, 10, 10) center:TKPointMake(44, 17) usingBlock:^(void)(TKTileGID tile, TKPoint coord) {
}];

sitterheim, 24.07.2015, 11:18
Idea status: under consideration

Comments

Leave a comment