Documentation
¶
Overview ¶
Some witty description here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity interface {
// Get the size of the entity.
Radius() float64
// Get the colour of this creature.
Color() color.RGBA
// Does all updating of an entity. Guarenteed to be thread-safe.
Work()
// Query the state of the entity.
// Returns a boolean for if it is being torn down on this check.
Check() bool
// Attempt to consume the enitity.
// Returns the amount consumed.
Consume() float64
}
Entity defines the methods an entity in the environment must expose.
type TestEntity ¶
Test entity, for testing!
func (*TestEntity) Check ¶
func (te *TestEntity) Check() bool
Check the entity. It returns as expected.
func (*TestEntity) Consume ¶
func (te *TestEntity) Consume() float64
Test entities cannot be consumed.
func (*TestEntity) Radius ¶
func (te *TestEntity) Radius() float64
Get the radius of the test entity.
Click to show internal directories.
Click to hide internal directories.