Skip to content

Iterating over finite tile layer #321

Answered by aleokdev
Blatko1 asked this question in Q&A
Discussion options

You must be logged in to vote

There's currently no iterator implemented, you'll have to use get_tile instead, sorry. You can use two nested fors, one for x and another for y, going from 0 to width/height non-inclusively.
BTW: I recommend using get_tile instead of get_tile_data because Tile also allows you to obtain its map/tileset and even tileset tile data directly.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Blatko1
Comment options

@aleokdev
Comment options

Answer selected by Blatko1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants