Documentation
¶
Index ¶
- func CoordsToTile(x, y int) (int16, int16)
- func TileCoords(col, row int16) (int, int)
- func TileIndexToKey(col, row int16) int32
- func YCoord(col, row int16) int
- type Map
- func (self *Map[T]) Delete(x, y int16)
- func (self *Map[T]) DeleteArea(x, y int16, w, h int)
- func (self *Map[T]) Each(fn func(x, y int16, value T))
- func (self *Map[T]) Get(x, y int16) (T, bool)
- func (self *Map[T]) Set(x, y int16, value T)
- func (self *Map[T]) SetArea(x, y int16, w, h int, value T)
- func (self *Map[T]) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoordsToTile ¶
Given logical x and y, returns the tile (col, row).
func TileCoords ¶
Given a tile column and row, returns the top left tile coordinates.
func TileIndexToKey ¶
Types ¶
type Map ¶
type Map[T any] struct { // contains filtered or unexported fields }
func (*Map[T]) DeleteArea ¶
Click to show internal directories.
Click to hide internal directories.