Documentation ¶
Index ¶
- func DeleteEntities()
- func DeleteEntity(id EntityID)
- func GroupCount() int
- func HasEntity(id EntityID) bool
- func Reset()
- func ResetAll()
- type C
- type CMP
- type CTX
- type CU
- type ET
- type EntityEventFunc
- type EntityID
- type EntityManager
- func (e *EntityManager) Component(key uint) (c CMP, ok bool)
- func (e *EntityManager) CreateCollector(et ...ET) C
- func (e *EntityManager) CreateEntity() EntityID
- func (e *EntityManager) DeleteEntities()
- func (e *EntityManager) DeleteEntity(id EntityID)
- func (e *EntityManager) Entities() []EntityID
- func (e *EntityManager) Group(m M) G
- func (e *EntityManager) GroupCount() int
- func (e *EntityManager) HasEntity(id EntityID) bool
- func (e *EntityManager) RegisterComponent(key uint, c CMP) CTX
- func (e *EntityManager) Reset()
- func (e *EntityManager) ResetAll()
- type G
- type GroupEvent
- type I
- type M
- type S
- type SS
- type U
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type C ¶
type C interface { Entities() []EntityID ClearCollectedEntities() }
C ...
func NewCollector ¶
func NewCollector(group []G, groupEvent []GroupEvent) C
NewCollector ... TODO: Write TEST
type CTX ¶
type CTX interface { ComponentAdded(key uint, id EntityID) ComponentDeleted(key uint, id EntityID) ComponentUpdated(key uint, id EntityID) HasEntity(id EntityID) bool }
CTX ...
type EntityManager ¶
type EntityManager struct {
// contains filtered or unexported fields
}
EntityManager ...
func (*EntityManager) Component ¶
func (e *EntityManager) Component(key uint) (c CMP, ok bool)
Component ...
func (*EntityManager) CreateCollector ¶
func (e *EntityManager) CreateCollector(et ...ET) C
CreateCollector ...
func (*EntityManager) CreateEntity ¶
func (e *EntityManager) CreateEntity() EntityID
CreateEntity ...
func (*EntityManager) DeleteEntity ¶
func (e *EntityManager) DeleteEntity(id EntityID)
DeleteEntity ...
func (*EntityManager) RegisterComponent ¶
func (e *EntityManager) RegisterComponent(key uint, c CMP) CTX
RegisterComponent ...
type G ¶
type G interface { HandleEntitySilently(id EntityID) HandleEntity(key uint, id EntityID) UpdateEntity(key uint, id EntityID) HasEntity(id EntityID) bool Entities() []EntityID HandleEntityAdded(f EntityEventFunc) HandleEntityDeleted(f EntityEventFunc) HandleEntityUpdated(f EntityEventFunc) }
G ...
type GroupEvent ¶
type GroupEvent uint
GroupEvent ...
const ( // GroupEventAdded ... GroupEventAdded GroupEvent = iota // GroupEventDeleted ... GroupEventDeleted // GroupEventUpdated ... GroupEventUpdated )
type M ¶
type M interface { HasAllOf(keys ...uint) bool HasNoneOf(keys ...uint) bool AllOfSlice() []uint AllOf(keys ...uint) M NoneOfSlice() []uint NoneOf(keys ...uint) M Match(e *EntityManager, id EntityID) bool Hash() uint }
M ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.