• Api Documentation
Show / Hide Table of Contents
  • LdtkParser
    • Direction
    • ILayer
    • ILdtkEntity
    • IWorld
    • LayerType
    • Level
    • World
  • LdtkParser.Exceptions
    • EntityNotFoundException
    • FieldStoreException
    • InvalidTileException
    • TilesetNotFoundException
  • LdtkParser.Graphics
    • ColorConverter
    • Sprite
    • SpriteEnum
    • Tileset
  • LdtkParser.Json
    • BgPos
    • CachedPixelData
    • DefaultOverride
    • Defs
    • Entity
    • EntityInstance
    • Enum
    • FieldDef
    • FieldInstance
    • GridTile
    • Header
    • IntGrid
    • IntGridValue
    • Layer
    • LayerInstance
    • Level
    • Neighbour
    • Param
    • Project
    • RealEditorValue
    • Serialize
    • Tile
    • Tileset
    • TypeClass
    • TypeUnion
    • Value
    • ValueClass
    • ValueUnion
  • LdtkParser.Layers
    • Entities
    • EntityModel
    • EnumValue
    • FieldStore
    • IntGrid
    • Tiles

Class World

Wraps the LDtk imported file and gives access to it's contents (via levels)

Inheritance
System.Object
World
Implements
IWorld
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: LdtkParser
Assembly: LdtkParser.dll
Syntax
public class World : IWorld

Constructors

World(String, GraphicsDevice)

Declaration
public World(string worldFile, GraphicsDevice graphicsDevice)
Parameters
Type Name Description
System.String worldFile
Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice

Methods

GetLevel(String)

Declaration
public Level GetLevel(string identifier)
Parameters
Type Name Description
System.String identifier
Returns
Type Description
Level

GetLevelByUid(Int32)

Declaration
public Level GetLevelByUid(int uid)
Parameters
Type Name Description
System.Int32 uid
Returns
Type Description
Level

GetSpriteEnum(String)

Gets a SpriteEnum A SpriteEnum is an abstraction level on LDtk Enums that have icons/tileset attached

Declaration
public static SpriteEnum GetSpriteEnum(string identifier)
Parameters
Type Name Description
System.String identifier

The name of the Enum as defined in LDtk

Returns
Type Description
SpriteEnum

The SpriteEnum

GetTileset(Int32)

Returns a given tileset

Declaration
public static Tileset GetTileset(int uid)
Parameters
Type Name Description
System.Int32 uid

The LDtk UID for the tileset

Returns
Type Description
Tileset

The found tileset

Exceptions
Type Condition
TilesetNotFoundException

Thrown if the tileset for the given UID does not exists

Implements

IWorld
In This Article
Back to top Generated by DocFX