class flixel.addons.nape.FlxNapeTilemap extends FlxTilemap

Available on all platforms

@author KeyMaster

Instance Fields

function new():Void

function addSolidTile(X:Int, Y:Int, ?mat:Material = null):Void

Adds a collision box for one tile at the specified position * Using this many times will fragment the collider mesh, possibly impacting performance! * If you are changing a lot of tiles, consider calling body.shapes.clear() and then setupCollideIndex or setupTileIndices * *

X

The X-Position of the tile *

Y

The Y-Position of the tile *

?mat

The material for the collider. Defaults to default nape material

function drawDebug():Void

function loadMap(MapData:Dynamic, TileGraphic:Dynamic, ?TileWidth:Int = 0, ?TileHeight:Int = 0, ?AutoTile:Int = 0, ?StartingIndex:Int = 0, ?DrawIndex:Int = 1, ?CollideIndex:Int = 1):FlxTilemap

function placeCustomPolygon(tileIndices:Array<Int>, vertices:Array<Vec2>, ?mat:Material = null):Void

function setupCollideIndex(?CollideIndex:Int = 1, ?mat:Material = null):Void

Builds the nape collider with all tiles indices greater or equal to CollideIndex as solid (like normally with FlxTilemap), and assigns the nape material * *

CollideIndex

All tiles with an index greater or equal to this will be solid *

?mat

The Nape physics material to use. Will use the default material if not specified

function setupTileIndices(tileIndices:Array<Int>, ?mat:Material = null):Void

Builds the nape collider with all indices in the array as solid, assigning the material * *

tileIndices

An array of all tile indices that should be solid *

?mat

The nape physics material applied to the collider. Defaults to nape default material

function update():Void