Header menu logo Nu

TmxMap Module

TmxMap functions for the world.

Functions and values

Function or value Description

TmxMap.getAttributesInferred tileSizeDivisor tileMap

Full Usage: TmxMap.getAttributesInferred tileSizeDivisor tileMap

Parameters:
    tileSizeDivisor : int
    tileMap : TmxMap

Returns: AttributesInferred
tileSizeDivisor : int
tileMap : TmxMap
Returns: AttributesInferred

TmxMap.getBodyProperties enabled friction restitution collisionCategories collisionMask bodyIndex tileMapDescriptor

Full Usage: TmxMap.getBodyProperties enabled friction restitution collisionCategories collisionMask bodyIndex tileMapDescriptor

Parameters:
    enabled : bool
    friction : single
    restitution : single
    collisionCategories : string
    collisionMask : string
    bodyIndex : int
    tileMapDescriptor : TileMapDescriptor

Returns: BodyProperties
enabled : bool
friction : single
restitution : single
collisionCategories : string
collisionMask : string
bodyIndex : int
tileMapDescriptor : TileMapDescriptor
Returns: BodyProperties

TmxMap.getBodyShapes tileMapDescriptor

Full Usage: TmxMap.getBodyShapes tileMapDescriptor

Parameters:
Returns: BodyShape list
tileMapDescriptor : TileMapDescriptor
Returns: BodyShape list

TmxMap.getDescriptor tileMapPosition tileSizeDivisor tileMap

Full Usage: TmxMap.getDescriptor tileMapPosition tileSizeDivisor tileMap

Parameters:
    tileMapPosition : Vector2
    tileSizeDivisor : int
    tileMap : TmxMap

Returns: TileMapDescriptor
tileMapPosition : Vector2
tileSizeDivisor : int
tileMap : TmxMap
Returns: TileMapDescriptor

TmxMap.getLayeredMessages2d time absolute viewBounds tileMapPosition tileMapElevation tileMapColor tileMapEmission tileLayerClearance tileSizeDivisor tileIndexOffset (arg11, arg12) tileMapPackage tileMap

Full Usage: TmxMap.getLayeredMessages2d time absolute viewBounds tileMapPosition tileMapElevation tileMapColor tileMapEmission tileLayerClearance tileSizeDivisor tileIndexOffset (arg11, arg12) tileMapPackage tileMap

Parameters:
    time : GameTime
    absolute : bool
    viewBounds : Box2
    tileMapPosition : Vector2
    tileMapElevation : single
    tileMapColor : Color
    tileMapEmission : Color
    tileLayerClearance : single
    tileSizeDivisor : int
    tileIndexOffset : int
    arg10 : int
    arg11 : int
    tileMapPackage : string
    tileMap : TmxMap

Returns: LayeredOperation2d list
time : GameTime
absolute : bool
viewBounds : Box2
tileMapPosition : Vector2
tileMapElevation : single
tileMapColor : Color
tileMapEmission : Color
tileLayerClearance : single
tileSizeDivisor : int
tileIndexOffset : int
arg10 : int
arg11 : int
tileMapPackage : string
tileMap : TmxMap
Returns: LayeredOperation2d list

TmxMap.getTileLayerBodyShapes tileLayer tileMapDescriptor

Full Usage: TmxMap.getTileLayerBodyShapes tileLayer tileMapDescriptor

Parameters:
Returns: List<BodyShape>
tileLayer : TmxLayer
tileMapDescriptor : TileMapDescriptor
Returns: List<BodyShape>

TmxMap.importShape shape center tileSize tileOffset

Full Usage: TmxMap.importShape shape center tileSize tileOffset

Parameters:
Returns: BodyShape
shape : BodyShape
center : Vector3
tileSize : Vector2
tileOffset : Vector2
Returns: BodyShape

TmxMap.makeDefault ()

Full Usage: TmxMap.makeDefault ()

Parameters:
    () : unit

Returns: TmxMap

Make a default TmxMap.

() : unit
Returns: TmxMap

TmxMap.makeEmpty ()

Full Usage: TmxMap.makeEmpty ()

Parameters:
    () : unit

Returns: TmxMap

Make an empty TmxMap.

() : unit
Returns: TmxMap

TmxMap.makeFromFilePath filePath

Full Usage: TmxMap.makeFromFilePath filePath

Parameters:
    filePath : string

Returns: TmxMap

Make a TmxMap from the content of a .tmx file.

filePath : string
Returns: TmxMap

TmxMap.makeFromStream stream

Full Usage: TmxMap.makeFromStream stream

Parameters:
Returns: TmxMap

Make a TmxMap from the content of a stream.

stream : Stream
Returns: TmxMap

TmxMap.makeFromText text

Full Usage: TmxMap.makeFromText text

Parameters:
    text : string

Returns: TmxMap

Make a TmxMap from the content of a text fragment.

text : string
Returns: TmxMap

TmxMap.makeLayerTile gid hflip vflip dflip

Full Usage: TmxMap.makeLayerTile gid hflip vflip dflip

Parameters:
    gid : int
    hflip : bool
    vflip : bool
    dflip : bool

Returns: TmxLayerTile

Make a TmxLayerTile.

gid : int
hflip : bool
vflip : bool
dflip : bool
Returns: TmxLayerTile

TmxMap.makeObject id gid x y width height

Full Usage: TmxMap.makeObject id gid x y width height

Parameters:
    id : int
    gid : int
    x : float
    y : float
    width : float
    height : float

Returns: TmxObject

Make a TmxObject.

id : int
gid : int
x : float
y : float
width : float
height : float
Returns: TmxObject

TmxMap.tryGetTileAnimationDescriptor tileIndex tileLayer tileMapDescriptor

Full Usage: TmxMap.tryGetTileAnimationDescriptor tileIndex tileLayer tileMapDescriptor

Parameters:
Returns: TileAnimationDescriptor voption
tileIndex : int
tileLayer : TmxLayer
tileMapDescriptor : TileMapDescriptor
Returns: TileAnimationDescriptor voption

TmxMap.tryGetTileDescriptor tileIndex tl tmd tileDescriptor

Full Usage: TmxMap.tryGetTileDescriptor tileIndex tl tmd tileDescriptor

Parameters:
Returns: bool
tileIndex : int
tl : TmxLayer
tmd : TileMapDescriptor
tileDescriptor : outref<TileDescriptor>
Returns: bool

TmxMap.tryGetTileMap tileMapAsset

Full Usage: TmxMap.tryGetTileMap tileMapAsset

Parameters:
Returns: TmxMap option
tileMapAsset : TileMap AssetTag
Returns: TmxMap option

Type something to start searching.