Versions in this module Expand all Collapse all v0 v0.6.1 Aug 17, 2024 v0.6.0 Aug 14, 2024 Changes in this version + type ComponentId = uint32 + type ComponentType = reflect.Type + type Entity uint64 + func (id Entity) String() string + type Lifecycle uint8 + const OnInit + const OnRunning + type Query interface + Evaluate func(mask *toolkit.DynamicBitSet) bool + String func() string + func And(query ...Query) Query + func Equal(componentIds ...ComponentId) Query + func In(componentIds ...ComponentId) Query + func NotIn(componentIds ...ComponentId) Query + func Or(query ...Query) Query + type Result struct + func (r *Result) Count() int + func (r *Result) Each(handler func(entity Entity) bool) + func (r *Result) Entities() []Entity + func (r *Result) Get(entity Entity, componentId ComponentId) any + func (r *Result) Iterator() ResultIterator + type ResultIterator struct + func (r *ResultIterator) Entity() Entity + func (r *ResultIterator) Get(componentId ComponentId) any + func (r *ResultIterator) Next() bool + func (r *ResultIterator) Reset() + type Storage = storage.Storage[entityId, ComponentId] + type System interface + OnLifecycle func(world World, lifecycle Lifecycle) + OnUpdate func(world World) + type World interface + Alive func(entity Entity) bool + Annihilate func(entity Entity) + Annihilates func(entities []Entity) + DeltaTime func() time.Duration + Get func(entity Entity, componentId ComponentId) any + Pause func() + Query func(query Query) *Result + QueryF func(query Query, handler func(result *Result)) + RegComponent func(component any) ComponentId + Resume func() + SetSleep func(d time.Duration) + SetTimeScale func(scale float64) + Spawn func(componentIds ...ComponentId) Entity + Spawns func(count int, componentIds ...ComponentId) []Entity + TimeScale func() float64 + Update func() + func NewWorld(systems ...System) World