Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definitions ¶
type Definitions struct {
Tilesets []TilesetDefinition `json:"tilesets"`
}
type EntityInstance ¶
type EntityInstance struct {
Identifier string `json:"__identifier"`
Grid []int `json:"__grid"`
Tile TileRectangle `json:"__tile"`
FieldInstances []FieldInstance `json:"fieldInstances"`
}
type FieldInstance ¶
type FieldInstance struct {
Identifier string `json:"__identifier"`
Tile TileRectangle `json:"__tile"`
Type string `json:"__type"`
Value interface{} `json:"__value"`
}
type LayerInstance ¶
type LayerInstance struct {
Type string `json:"__type"`
Identifier string `json:"__identifier"`
CHei int `json:"__cHei"`
CWid int `json:"__cWid"`
EntityInstances []EntityInstance `json:"entityInstances"`
GridTiles []TileInstance `json:"gridTiles"`
TilesetDefUid int `json:"__tilesetDefUid"`
GridSize int `json:"__gridSize"`
IntGridCsv []int `json:"intGridCsv"`
}
func (*LayerInstance) GetInt ¶
func (layer *LayerInstance) GetInt(x, y int) int
type LdtkJSON ¶
type LdtkJSON struct {
Levels []Level `json:"levels"`
Defs Definitions `json:"defs"`
}
func UnmarshalLdtkJSON ¶
func (*LdtkJSON) GetLevelByName ¶
Return all json data of a LDtk Level with a given name
func (*LdtkJSON) GetLevelIndex ¶
type Level ¶
type Level struct {
Identifier string `json:"identifier"`
PxWid int `json:"pxWid"`
PxHei int `json:"PxHei"`
LayerInstances []LayerInstance `json:"layerInstances"`
FieldInstances []FieldInstance `json:"fieldInstances"`
}
func (*Level) GetLayerByName ¶
func (level *Level) GetLayerByName(name string) *LayerInstance
type TileInstance ¶
type TileRectangle ¶
type TilesetDefinition ¶
Click to show internal directories.
Click to hide internal directories.