class flixel.tile.FlxTilemapBuffer
Available on all platforms
A helper object to keep tilemap drawing performance decent across the new multi-camera system. * Pretty much don't even have to think about this class unless you are doing some crazy hacking.
Instance Fields
Whether or not the coordinates should be rounded during draw(), true by default (recommended for pixel art). * Only affects tilesheet rendering and rendering using BitmapData.draw() in blitting. * (copyPixels() only renders on whole pixels by nature). Causes draw() to be used if false, which is more expensive.
function new(TileWidth:Int, TileHeight:Int, WidthInTiles:Int, HeightInTiles:Int, ?Camera:FlxCamera = null, ?ScaleX:Float = 1.0f, ?ScaleY:Float = 1.0f):Void
Instantiates a new camera-specific buffer for storing the visual tilemap data. * *
TileWidth | The width of the tiles in this tilemap. * |
TileHeight | The height of the tiles in this tilemap. * |
WidthInTiles | How many tiles wide the tilemap is. * |
HeightInTiles | How many tiles tall the tilemap is. * |
Camera | Which camera this buffer relates to. |
function draw(Camera:FlxCamera, FlashPoint:Point, ?ScaleX:Float = 1.0f, ?ScaleY:Float = 1.0f):Void
Just stamps this buffer onto the specified camera at the specified location. * *
Camera | Which camera to draw the buffer onto. * |
FlashPoint | Where to draw the buffer at in camera coordinates. |
function fill(?Color:Int = 0):Void
Fill the buffer with the specified color. * Default value is transparent. * *
Color | What color to fill with, in 0xAARRGGBB hex format. |