Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface {
Type() ComponentType
}
type ComponentType ¶
type ComponentType string
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
func (*Entity) AddComponent ¶
func (*Entity) AddComponents ¶
func (*Entity) GetComponent ¶
func (e *Entity) GetComponent(c ComponentType) Component
func (*Entity) HasComponent ¶
func (e *Entity) HasComponent(c ComponentType) bool
func (*Entity) MarshalJSON ¶
func (*Entity) RemoveComponent ¶
func (e *Entity) RemoveComponent(c ComponentType)
type EntityManager ¶
type EntityManager struct {
// contains filtered or unexported fields
}
func NewEntityManager ¶
func NewEntityManager(entities []Entity) *EntityManager
func (*EntityManager) FindByComponents ¶
func (em *EntityManager) FindByComponents(components ...ComponentType) []*Entity
func (*EntityManager) NewEntity ¶
func (em *EntityManager) NewEntity() *Entity
func (*EntityManager) RemoveEntity ¶
func (em *EntityManager) RemoveEntity(e *Entity)
func (*EntityManager) Size ¶
func (em *EntityManager) Size() int
Click to show internal directories.
Click to hide internal directories.