TileArray? Accessing Tiles?

Sep 13, 2012 at 4:06 PM
Edited Sep 13, 2012 at 4:19 PM

I'm using a TileArray to get all the Tiles in a Layer and am trying to use a for loop to find all the Tile Locations.

 

TileArray x= map.GetLayer("Foreground").Tiles;

This gives me a TileArray[x,y] of all my Tiles correct? How do I then find all the Tiles in the

Array when I don't know or can't get the length of 'x' or of 'y'?

Basically I need to access all the tiles that have Tile brushed on them. How can I do this?

Sep 13, 2012 at 7:18 PM

The LayerWidth and LayerHeight properties of the Layer instance give you the layer's width and height in tiles respectively. The tile indices range from 0 to one less than the width/height.

Sep 13, 2012 at 9:12 PM

Thank you!