class flixel.tile.FlxTileblock extends FlxSprite

Available on all platforms

This is a basic "environment object" class, used to create simple walls and floors. * It can be filled with a random selection of tiles to quickly add detail.

Instance Fields

function new(X:Int, Y:Int, Width:Int, Height:Int):Void

Creates a new FlxBlock object with the specified position and size. * *

X

The X position of the block. *

Y

The Y position of the block. *

Width

The width of the block. *

Height

The height of the block.

function loadTiles(TileGraphic:Dynamic, ?TileWidth:Int = 0, ?TileHeight:Int = 0, ?Empties:Int = 0):FlxTileblock

Fills the block with a randomly arranged selection of graphics from the image provided. * *

TileGraphic

The graphic class that contains the tiles that should fill this block. *

TileWidth

The width of a single tile in the graphic. *

TileHeight

The height of a single tile in the graphic. *

Empties

The number of "empty" tiles to add to the auto-fill algorithm (e.g. 8 tiles + 4 empties = 1/3 of block will be open holes).