Documentation ¶
Overview ¶
Package tilemap is a TMX format Tilemap Parser and Renderer for Kaori
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct { Encoding string `xml:"encoding,attr"` Compression string `xml:"compression,attr"` Data string `xml:",chardata"` }
Data is a structure for Layer's Tile Data
type Image ¶
type Image struct { Source string `xml:"source,attr"` Width int `xml:"width,attr"` Height int `xml:"height,attr"` }
Image is the actual image for the spritesheet or texture
type Layer ¶
type Layer struct { Parent *Map Name string `xml:"name,attr"` Width int `xml:"width,attr"` Height int `xml:"height,attr"` Spacing int `xml:"spacing,attr"` Margin int `xml:"margin,attr"` Data *Data `xml:"data"` Tiles [][]int `xml:"-"` }
Layer is a structure for TMX Tilemap Layers
type Map ¶
type Map struct { XMLName xml.Name `xml:"map"` 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"` Tilesets []*Tileset `xml:"tileset"` Layers []*Layer `xml:"layer"` ObjectGroups []*ObjectGroup `xml:"objectgroup"` }
Map is the actual TMX map structure
type Object ¶
type Object struct { Id int `xml:"id,attr"` X int `xml:"x,attr"` Y int `xml:"y,attr"` Gid int `xml:"gid,attr"` Width int `xml:"width,attr"` Height int `xml:"height,attr"` Polyline Polyline `xml:"polyline"` }
Object is a tile map object It can be an ellipse, rectangle, or a polyline
type ObjectGroup ¶
ObjectGroup is a group of tiled map objects
type Polyline ¶
type Polyline struct {
Points string `xml:"points,attr"`
}
Polyline is a list of points representing a polygonal shape or line
type Tileset ¶
type Tileset struct { Name string `xml:"name,attr"` TileWidth int `xml:"tilewidth,attr"` TileHeight int `xml:"tileheight,attr"` TileCount int `xml:"tilecount,attr"` Columns int `xml:"columns,attr"` Spacing int `xml:"spacing,attr"` Margin int `xml:"margin,attr"` FirstID int `xml:"firstgid,attr"` Image Image `xml:"image"` }
Tileset is a set of sprites or textures for the tiled map
Click to show internal directories.
Click to hide internal directories.