Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BadID types.EntityID = math.MaxUint64 ErrEntityDoesNotExist = errors.New("entity does not exist") ErrComponentAlreadyOnEntity = errors.New("component already on entity") ErrComponentNotOnEntity = errors.New("component not on entity") ErrEntityMustHaveAtLeastOneComponent = errors.New("entities must have at least 1 component") ErrMustRegisterComponent = errors.New("must register component") // ErrComponentMismatchWithSavedState is an error that is returned when a ComponentID from // the saved state is not found in the passed in list of components. ErrComponentMismatchWithSavedState = errors.New("registered components do not match with the saved state") )
Functions ¶
This section is empty.
Types ¶
type ArchetypeIterator ¶
type ArchetypeIterator struct { Current int Values []types.ArchetypeID }
func (*ArchetypeIterator) HasNext ¶
func (it *ArchetypeIterator) HasNext() bool
func (*ArchetypeIterator) Next ¶
func (it *ArchetypeIterator) Next() types.ArchetypeID
type EntityIterator ¶
type EntityIterator struct {
// contains filtered or unexported fields
}
EntityIterator is an iterator for Ent lists in archetypes.
func NewEntityIterator ¶
func NewEntityIterator(current int, archAccessor HasEntitiesForArchetype, indices []types.ArchetypeID) EntityIterator
NewEntityIterator returns an iterator for Entitys.
func (*EntityIterator) HasNext ¶
func (it *EntityIterator) HasNext() bool
HasNext returns true if there are more Ent list to iterate over.
type HasEntitiesForArchetype ¶
type HasEntitiesForArchetype interface {
GetEntitiesForArchID(archID types.ArchetypeID) ([]types.EntityID, error)
}
Click to show internal directories.
Click to hide internal directories.