INNER CODE UNIT · Go
func
yohamta0/donburi-ecs · entry.go:73
func (e *Entry) Id() storage.EntityId {
return e.id
}
// Entity returns the entity.
func (e *Entry) Entity() Entity {
return e.entity
}
// Component returns the component.
func (e *Entry) Component(c component.IComponentType) unsafe.Pointer {
return e.World.components.Storage(c).Component(e.loc.Archetype, e.loc.Component)
}
// SetComponent sets the component.
func (e *Entry) SetComponent(c component.IComponentType, component unsafe.Pointer) {
e.World.components.Storage(c).SetComponent(e.loc.Archetype, e.loc.Component, component)
}