Versions in this module Expand all Collapse all v1 v1.0.0 Feb 16, 2020 Changes in this version + func Distance(v1, v2 pixel.Vec) float64 + func ManDist(v1, v2 pixel.Vec) float64 + func Sqrt(x float64) float64 + type Being interface + DealDamage func(from uint64, damage float64) (healthAfter float64) + Health func() float64 + ID func() uint64 + MoveTo func([2]float64) + SetHealth func(float64) + Type func() types.Type + X func() float64 + Y func() float64 + func NewStaticEntity(uid uint64, beingtype types.Type, atx, aty float64) Being + type Beings []Being + func (entities Beings) Len() int + func (entities Beings) Less(x, y int) bool + func (entities Beings) String() string + func (entities Beings) Swap(x, y int) + type Object interface + Name func() string + Pos func() pixel.Vec + Type func() types.Type + type P struct + PID uint64 + PT types.Type + PX float64 + PY float64 + func (p P) Encode(b []byte) (n int, err error) + func (p P) ID() uint64 + func (p P) MoveTo(d [2]float64) + func (p P) Type() types.Type + func (p P) X() float64 + func (p P) Y() float64 + type Tile struct + MovementCost float64 + Type types.Type + X float64 + Y float64 + func (t *Tile) Copy(newtileset Tileset) *Tile + func (t *Tile) Down() *Tile + func (t *Tile) Left() *Tile + func (t *Tile) ManhattanDistance(to astar.Pather) float64 + func (t *Tile) PathEstimatedCost(to astar.Pather) float64 + func (t *Tile) PathNeighborCost(to pathfinder.Pather) float64 + func (t *Tile) PathNeighbors() pathfinder.Pathers + func (t *Tile) PathTo(t2 *Tile) (pathfinder.Pathers, float64, bool) + func (t *Tile) Pos() pixel.Vec + func (t *Tile) Right() *Tile + func (t *Tile) SetTileset(newtileset Tileset) + func (t *Tile) Up() *Tile + type Tileset map[pixel.Vec]*Tile + type World struct + func New() *World + func (w *World) Batch(b Beings) + func (w *World) BatchFn(fn func(b Being) error) error + func (w *World) DealDamage(fromPlayer uint64, toPlayer uint64, amount float64) (healthAfter float64) + func (w *World) Get(uid uint64) Being + func (w *World) GetTile(at pixel.Vec) *Tile + func (w *World) Len() int + func (w *World) NewTile(tiletype types.Type, x, y float64) *Tile + func (w *World) Remove(playerid uint64) + func (w *World) SetTile(t *Tile) + func (w *World) SnapshotBeings() Beings + func (w *World) Update(b Being) (isNew bool)