class openfl.display.Tilesheet
Available on all platforms
Sub classes | ||||
![]() | TileSheetExt |
|
Class Fields
Instance Fields
function drawTiles(graphics:Graphics, tileData:Array<Float>, ?smooth:Bool = false, ?flags:Int = 0, ?count:Int = -1):Void
Fast method to draw a batch of tiles using a Tilesheet * * The input array accepts the x, y and tile ID for each tile you wish to draw. * For example, an array of [ 0, 0, 0, 10, 10, 1 ] would draw tile 0 to(0, 0) and * tile 1 to(10, 10) * * You can also set flags for TILESCALE, TILEROTATION, TILERGB and * TILEALPHA. * * Depending on which flags are active, this is the full order of the array: * * [ x, y, tile ID, scale, rotation, red, green, blue, alpha, x, y ... ] * *
graphics | The native.display.Graphics object to use for drawing * |
tileData | An array of all position, ID and optional values for use in drawing * |
smooth | (Optional) Whether drawn tiles should be smoothed(Default: false) * |
flags | (Optional) Flags to enable scale, rotation, RGB and/or alpha when drawing(Default: 0) |