Constructor

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

Variables

Methods

getBounds (targetCoordinateSpace:Tile):Rectangle

Gets you the bounding box of the Tile. It will find a tileset to know the original rect Then it will apply all the transformations from his parent.

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.

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