tilemap

package module
v0.0.0-...-04bda32 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 0 Imported by: 0

README

TileMap

A simple tile map implementation. This is not intended to interface with any particular existing format of tile maps. It is simply meant to create a memory structure representing tiles and data that can hold them.

License

Licensed under the terms of the MIT license. Please refer to LICENSE for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point struct {
	X int
	Y int

} //struct

type Tile

type Tile struct {
	Pos  Point
	Data interface{}

} //struct

type TileMap

type TileMap struct {
	// contains filtered or unexported fields

} //struct

func NewTileMap

func NewTileMap(width, height int) *TileMap

func (*TileMap) GetTile

func (t *TileMap) GetTile(x, y int) *Tile

func (*TileMap) GetTilePos

func (t *TileMap) GetTilePos(p Point) *Tile

func (*TileMap) Height

func (t *TileMap) Height() int

func (*TileMap) Width

func (t *TileMap) Width() int

Jump to

Keyboard shortcuts

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