(original by Matt Tuttle based on Thomas Jahn's. Haxe port by Adrien Fischer) This content is released under the MIT License.

Static variables

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

@:value(0x80000000)staticinlineread onlyFLIPPED_HORIZONTALLY_FLAG:Int = 0x80000000

@:value(0x40000000)staticinlineread onlyFLIPPED_VERTICALLY_FLAG:Int = 0x40000000

Use these to determine whether a sprite should be flipped, for example:

var flipped:Bool = (object.gid & TiledObject.FLIPPED_HORIZONTALLY_FLAG) > 0;
sprite.facing = flipped ? LEFT : RIGHT;

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

@:value(3)staticinlineread onlyPOLYLINE:Int = 3

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

@:value(4)staticinlineread onlyTILE:Int = 4

Constructor

@:has_untyped@:value({ parent : null })new(source:Access, ?parent:TiledObjectLayer)

Variables

angle:Float

In degrees

read onlyflippedHorizontally:Bool

Whether the object is flipped horizontally.

read onlyflippedVertically:Bool

Whether the object is flipped vertically.

gid:Int

Global identifier for this object

layer:TiledObjectLayer

Information on the layer that contains this object

read onlyobjectType:Int

The type of the object (RECTANGLE, ELLIPSE, POLYGON, POLYLINE, TILE)

points:Array<FlxPoint>

An array with points if the object is a POLYGON or POLYLINE

properties:TiledPropertySet

Custom properties that users can set on this object If "type" is not defined, the parent layer's "defaultType" is used

shared:TiledPropertySet

Shared properties are tileset properties added on object tile