Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NilTile = &TileInfo{Nil: true}
Functions ¶
This section is empty.
Types ¶
type Layer ¶
type Layer struct {
ID int `xml:"id,attr"`
Name string `xml:"name,attr"`
X int `xml:"x,attr"`
Y int `xml:"y,attr"`
Width int `xml:"width,attr"`
Height int `xml:"height,attr"`
Opacity float32 `xml:"opacity,attr"`
Visible bool `xml:"visible,attr"`
OffsetX int `xml:"offsetx,attr"`
OffsetY int `xml:"offsety,attr"`
Properties []Property `xml:"properties>property"`
Data Data `xml:"data"`
Tiles []*TileInfo
}
type Map ¶
type Map struct {
Version string `xml:"version,attr"`
TiledVersion string `xml:"tiledversion,attr"`
Orientation string `xml:"orientation,attr"`
RenderOrder string `xml:"renderorder,attr"`
Width int `xml:"width,attr"`
Height int `xml:"height,attr"`
TileWidth int `xml:"tilewidth,attr"`
TileHeight int `xml:"tileheight,attr"`
HexSideLength int `xml:"hexsidelength,attr"`
StaggerAxis int `xml:"staggeraxis,attr"`
StaggerIndex int `xml:"staggerindex,attr"`
BackgroundColor string `xml:"backgroundcolor,attr"`
NextLayerID int `xml:"nextlayerid,attr"`
NextObjectID int `xml:"nextobjectid,attr"`
Properties []Property `xml:"properties>property"`
TileSets []TileSet `xml:"tileset"`
Layers []Layer `xml:"layer"`
ObjectGroups []ObjectGroup `xml:"objectgroup"`
}
Map represents the TMX Map Format https://doc.mapeditor.org/en/stable/reference/tmx-map-format/
type Object ¶
type Object struct {
Name string `xml:"name,attr"`
Type string `xml:"type,attr"`
X int `xml:"x,attr"`
Y int `xml:"y,attr"`
Width int `xml:"width,attr"`
Height int `xml:"height,attr"`
GID int `xml:"gid,attr"`
Visible bool `xml:"visible,attr"`
Properties []Property `xml:"properties>property"`
Polygons []Polygon `xml:"polygon"`
PolyLines []PolyLine `xml:"polyline"`
}
type ObjectGroup ¶
type TileSet ¶
type TileSet struct {
FirstGID GID `xml:"firstgid,attr"`
Source string `xml:"source,attr"`
Name string `xml:"name,attr"`
TileWidth int `xml:"tilewidth,attr"`
TileHeight int `xml:"tileheight,attr"`
Spacing int `xml:"spacing,attr"`
Margin int `xml:"margin,attr"`
Properties []Property `xml:"properties>property"`
Image *Image `xml:"image"`
Tiles []Tile `xml:"tile"`
Tilecount int `xml:"tilecount,attr"`
Columns int `xml:"columns,attr"`
}
Click to show internal directories.
Click to hide internal directories.