class flixel.tile.FlxTile extends FlxObject
Available on all platforms
A simple helper object for FlxTilemap that helps expand collision opportunities and control. * You can use FlxTilemap.setTileProperties() to alter the collision properties and * callback functions and filters for this object to do things like one-way tiles or whatever.
Instance Fields
Each tile can store its own filter class for their callback functions. * That is, the callback will only be triggered if an object with a class * type matching the filter touched it. * Defaults to null, set through FlxTilemap.setTileProperties().
The index of this tile type in the core map data. * For example, if your map only has 16 kinds of tiles in it, * this number is usually between 0 and 15.
The current map index of this tile object at this moment. * You can think of tile objects as moving around the tilemap helping with collisions. * This value is only reliable and useful if used from the callback function.
function new(Tilemap:FlxTilemap, Index:Int, Width:Float, Height:Float, Visible:Bool, AllowCollisions:Int):Void
Instantiate this new tile object. This is usually called from FlxTilemap.loadMap(). * *
Tilemap | A reference to the tilemap object creating the tile. * |
Index | The actual core map data index for this tile type. * |
Width | The width of the tile. * |
Height | The height of the tile. * |
Visible | Whether the tile is visible or not. * |
AllowCollisions | The collision flags for the object. By default this value is ANY or NONE depending on the parameters sent to loadMap(). |
function callbackFunction(:FlxObject, :FlxObject):Void
This function is called whenever an object hits a tile of this type. * This function should take the form myFunction(Tile:FlxTile,Object:FlxObject):void. * Defaults to null, set through FlxTilemap.setTileProperties().