tmx

package module
v0.0.0-...-411f862 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2019 License: MIT Imports: 13 Imported by: 0

README

tmx

Parses json formatted Tiled maps.

Example
package main

import (
  "fmt"
  "github.com/drakbar/tmx"
)

func main() {
  
  m, err := tmx.LoadTileMap("path/to/mapfile.json")
  
  if err != nil {
    panic(err)
  }

  fmt.Printf("%+v\n", m)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTileMap

func LoadTileMap(fp string) (m tilemap, e error)

LoadTileMap reads in a tilemap from disk, sends the data out to be processed, and finally returns a tilemap.

Types

type Tile

type Tile struct {
	// contains filtered or unexported fields
}

func (Tile) DiagonalFlip

func (t Tile) DiagonalFlip() bool

func (Tile) Gid

func (t Tile) Gid() uint32

func (Tile) HorizontialFlip

func (t Tile) HorizontialFlip() bool

func (Tile) Lid

func (t Tile) Lid() uint32

func (Tile) Nil

func (t Tile) Nil() bool

func (Tile) Tileset

func (t Tile) Tileset() string

func (Tile) VerticalFlip

func (t Tile) VerticalFlip() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL