INNER CODE UNIT · Go
targetLayout
yohamta0/donburi-ecs · entry.go:117
targetLayout := make([]component.IComponentType, 0, len(baseLayout)-1)
for _, c2 := range baseLayout {
if c2 == c {
continue
}
targetLayout = append(targetLayout, c2)
}
targetArchetype := e.World.getArchetypeForComponents(targetLayout)
e.World.TransferArchetype(e.loc.Archetype, targetArchetype, e.loc.Component)
e.loc = e.World.Entry(e.entity).loc
}
// Remove removes the entity from the world.
func (e *Entry) Remove() {
e.World.Remove(e.entity)
}