Types
Archetype = ref object id*: ArchetypeId componentIds*: seq[ComponentId] componentLists*: Table[ComponentId, EcsSeqAny]
- Source Edit
ArchetypeId = PackedSet[ComponentId]
- Source Edit
ComponentId = distinct int
- Source Edit
Procs
proc `$`(id: ComponentId): string {....raises: [], tags: [], forbids: [].}
- Source Edit
proc archetypeIdFrom(compIds: seq[ComponentId]): ArchetypeId {....raises: [], tags: [], forbids: [].}
- Source Edit
proc contains(archetype: Archetype; candidateId: ArchetypeId): bool {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc contains(archetype: Archetype; candidateId: ComponentId): bool {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc disjointed(archetype: Archetype; candidateId: ArchetypeId): bool {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc makeArchetype(compIds: seq[ComponentId]; builders: seq[Builder]; movers: seq[Mover]): Archetype {....raises: [Exception], tags: [RootEffect], forbids: [].}
- Source Edit
proc makeNextAdding(archetype: Archetype; compIds: seq[ComponentId]; builders: seq[Builder]; movers: seq[Mover]): Archetype {. ...raises: [Exception], tags: [RootEffect], forbids: [].}
- Source Edit
proc makeNextRemoving(archetype: Archetype; compIds: seq[ComponentId]): Archetype {. ...raises: [Exception], tags: [RootEffect], forbids: [].}
- Source Edit
proc moveAdding(fromArchetype: var Archetype; fromArchetypeEntityId: int; toArchetype: var Archetype; adders: Table[ComponentId, Adder]): int {. ...raises: [KeyError, Exception], tags: [RootEffect], forbids: [].}
- Source Edit
proc moveRemoving(fromArchetype: var Archetype; fromArchetypeEntityId: int; toArchetype: var Archetype): int {. ...raises: [KeyError, Exception], tags: [RootEffect], forbids: [].}
- Source Edit
Iterators
iterator components[T](archetype: Archetype; componentId: ComponentId): T
- Source Edit
Macros
macro fieldTypes(tup: typed; body: untyped): untyped
- Source Edit