Static variables

@:value(0)staticinlineread onlyROTATE_0:Int = 0

@:value(2)staticinlineread onlyROTATE_270:Int = 2

@:value(1)staticinlineread onlyROTATE_90:Int = 1

Constructor

new(TilesetId:Int, FlipX:Bool, FlipY:Bool, Rotate:Int)

Variables

@:value(0)currTileId:Int = 0

@:value(true)dirty:Bool = true

@:value(false)flipX:Bool = false

@:value(false)flipY:Bool = false

Methods

@:value({ frameRate : 30 })addAnimation(tiles:Array<Int>, frameRate:Float = 30, ?framesData:Array<AnimParams>):Void

Add an animation to this special tile

Parameters:

tiles

An array with the tilesetID of each frame

frameRate

The speed of the animation in frames per second (Default: 30)

fromSpriteAnimation(anim:FlxAnimation):Void

Creates tile animation and copies data from specified sprite animation (name, frame ids, framerate and looping);

Parameters:

anim

Animation to copy data from

getMatrix():FlxMatrix

Calculates and return the matrix

Parameters:

width

the tile width

height

the tile height

Returns:

The matrix calculated

inlineisFlipped():Bool

inlineisSpecial():Bool

Inherited Variables

Defined by FlxBasic

@:value(idEnumerator++)ID:Int = idEnumerator++

A unique ID starting from 0 and increasing by 1 for each subsequent FlxBasic that is created.

@:value(true)active:Bool = true

Controls whether update() is automatically called by FlxState/FlxGroup.

@:value(true)alive:Bool = true

Useful state for many game objects - "dead" (!alive) vs alive. kill() and revive() both flip this switch (along with exists, but you can override that).

camera:FlxCamera

Gets or sets the first camera of this object.

cameras:Array<FlxCamera>

This determines on which FlxCameras this object will be drawn. If it is null / has not been set, it uses the list of default draw targets, which is controlled via FlxG.camera.setDefaultDrawTarget as well as the DefaultDrawTarget argument of FlxG.camera.add.

@:value(true)exists:Bool = true

Controls whether update() and draw() are automatically called by FlxState/FlxGroup.

@:value(true)visible:Bool = true

Controls whether draw() is automatically called by FlxState/FlxGroup.

Inherited Methods

Defined by FlxBasic

draw():Void

Override this function to control how the object is drawn. Doing so is rarely necessary, but can be very useful.

kill():Void

Handy function for "killing" game objects. Use reset() to revive them. Default behavior is to flag them as nonexistent AND dead. However, if you want the "corpse" to remain in the game, like to animate an effect or whatever, you should override this, setting only alive to false, and leaving exists true.

revive():Void

Handy function for bringing game objects "back to life". Just sets alive and exists back to true. In practice, this function is most often called by FlxObject#reset().