single

package
v0.0.0-...-9e256ac Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type World

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

A world holds entities

func New

func New() *World

func (*World) AddEntity

func (w *World) AddEntity(entity *world.Entity)

func (*World) Count

func (w *World) Count() int

func (*World) Debug

func (w *World) Debug()

func (*World) EntityByID

func (w *World) EntityByID(entityID world.EntityID, callback func(entity *world.Entity) (remove bool))

func (*World) ForEntities

func (w *World) ForEntities(callback func(entity *world.Entity) (stop, remove bool)) bool

func (*World) ForEntitiesAndOthers

func (w *World) ForEntitiesAndOthers(entityCallback func(entity *world.Entity) (stop bool, radius float32),
	otherCallback func(entityID world.EntityID, entity *world.Entity, otherEntityID world.EntityID, otherEntity *world.Entity) (stop, remove, removeOther bool)) bool

func (*World) ForEntitiesInRadius

func (w *World) ForEntitiesInRadius(position world.Vec2f, radius float32, callback func(radius float32, entity *world.Entity) (stop bool)) bool

func (*World) Resize

func (w *World) Resize(radius float32)

func (*World) SetParallel

func (w *World) SetParallel(_ bool) bool

Ignore for now

Jump to

Keyboard shortcuts

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