Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Tile ¶
type Tile struct { Pos string // String representation of the position. Ex: (1, 3) Coords image.Point // The number representation of the above. This is not in pixels Rectangle image.Rectangle Color color.Color // What color the tile should be rendered with Cost int // How long it takes to get past the tile }
Tile is a section of the screen for pathfinding
func GetCurrentTile ¶
GetCurrentTile finds the tile that a point is in the most
func (*Tile) GetImage ¶
GetImage shows the image inside of a tile. The function should be passed the image of the whole screen
func (*Tile) PathEstimatedCost ¶
func (*Tile) PathNeighborCost ¶
func (*Tile) PathNeighbors ¶
func (t *Tile) PathNeighbors() []astar.Pather
PathNeighbors returns a slice of the tiles neighboring a tile
Click to show internal directories.
Click to hide internal directories.