CastleDB integration; A part of CdbLevel decoder.

Constructor

new(level:CdbLevel)

Variables

read onlycontent:TileGroup

Alias to the first element of contents

contents:Array<TileGroup>

One or several tile groups that will be used to display the layer

data:LevelLayerData

The raw data of the layer. You can read it or modify it then set needRedraw=true to update it on screen.

read onlylayerIndex:Int

CdbLevel extends Layers: this index will tell in which object layer this LevelLayer content is added to.

level:CdbLevel

Which level this layer belongs to

name:String

The name of the layer, as it was created in CDB

@:value(true)needRedraw:Bool = true

If the layer needs to be redrawn, it's set to true.

objectsBehind:Bool

Allows to add objects on the same layerIndex that can behind or in front of the

tileset:LevelTileset

The tileset this layer is using to display its graphics

Methods

buildIntProperty(name:String):Array<Int>

Returns the data for the given CDB per-tile property based on the data of the current layer. For instance if you have a "collide" per-tile property set for several of your objects or tiles, then calling buildIntProperty("collide") will return you with the collide data for the given layer. In case of objects, if several objects overlaps, the greatest property value overwrites the lowest.

buildStringProperty(name:String):Array<String>

remove():Void

Entirely removes this layer from the level.