LdtkWorld

ceramic.LdtkWorld (Class)

Represents a world in an LDtk project.

A world contains multiple levels arranged according to a specific layout (Free, GridVania, LinearHorizontal, or LinearVertical).

In multi-world projects, each world acts as a separate game area or chapter. Single-world projects will have one default world containing all levels.

Instance Members

ldtk
ldtkData: LdtkData

The LdtkData object this world belongs to


ldtk
identifier: String

User defined unique identifier


ldtk
iid: String

Unique instance identifer


ldtk
levels: Array<LdtkLevel>

All levels from this world. The order of this array is only relevant in LinearHorizontal and LinearVertical world layouts (see worldLayout value). Otherwise, you should refer to the worldX,worldY coordinates of each Level.


ldtk
worldGridWidth: Int

Width of the world grid in pixels.


ldtk
worldGridHeight: Int

Height of the world grid in pixels.


ldtk
worldLayout: LdtkWorldLayout

An enum that describes how levels are organized in this project (ie. linearly or in a 2D space).


ldtk
level(identifier: String): LdtkLevel
Name Type
identifier String
Returns
LdtkLevel

ldtk
levelByIid(iid: String): LdtkLevel
Name Type
iid String
Returns
LdtkLevel

ldtk
toString(): String
Returns
String

ldtk
new(?ldtkData: LdtkData, ?json: haxe.DynamicAccess<Dynamic>): Void
Name Type Default
ldtkData LdtkData (optional)
json haxe.DynamicAccess<Dynamic> (optional)