Documentation ¶
Index ¶
- type Component
- type Entity
- func (ent *Entity) AddComponent(componentName string, component Component) *Entity
- func (ent *Entity) GetComponent(componentName string) Component
- func (ent *Entity) GetComponentList() map[string]Component
- func (ent *Entity) Render()
- func (ent *Entity) SetPosition(pos mgl32.Vec3)
- func (ent *Entity) Update(time, elapsed float64)
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface { Update(time, elapsed float64) Render() }
Component Interface
type Entity ¶
type Entity struct { Components map[string]Component Active bool Index uint32 Position mgl32.Vec3 Rotation mgl32.Mat3 }
Entity that holds entities
func (*Entity) AddComponent ¶
AddComponent attaches new component to the manager
func (*Entity) GetComponent ¶
GetComponent .
func (*Entity) GetComponentList ¶
GetComponentList .
Click to show internal directories.
Click to hide internal directories.