Constructor

new (x:Float = 0, y:Float = 0, scaleX:Float = 1, scaleY:Float = 1, rotation:Float = 0, originX:Float = 0, originY:Float = 0)

Variables

read onlynumTiles:Int

Methods

addTileAt (tile:Tile, index:Int):Tile

addTiles (tiles:Array<Tile>):Array<Tile>

contains (tile:Tile):Bool

getBounds (targetCoordinateSpace:Tile):Rectangle

Override from tile. A single tile, just has his rectangle. A container must get a rectangle that contains all other rectangles.

Parameters:

targetCoordinateSpace

The tile that works as a coordinate system.

Returns:

Rectangle The bounding box. If no box found, this will return {0,0,0,0} rectangle instead of null.

getTileAt (index:Int):Tile

getTileIndex (tile:Tile):Int

removeTileAt (index:Int):Tile

removeTiles (beginIndex:Int = 0, endIndex:Int = 0x7fffffff):Void

setTileIndex (tile:Tile, index:Int):Void

swapTiles (tile1:Tile, tile2:Tile):Void

swapTilesAt (index1:Int, index2:Int):Void

Inherited Variables

Inherited Methods

Defined by Tile

hitTestTile (obj:Tile):Bool

Evaluates the bounding box of the tile to see if it overlaps or intersects with the bounding box of the obj tile. Both tiles must be under the same Tilemap for this to work.

Parameters:

obj

The tile to test against.

Returns:

true if the bounding boxes of the tiles intersect; false if not.

invalidate ():Void