Types
ArchetypeBuilder[T] = ref object
- A builder for creating a list of all known archetypes
Procs
proc `==`(a, b: BuilderAction): bool {....raises: [], tags: [], forbids: [].}
proc accessory[T](builder: var ArchetypeBuilder[T]; value: T)
- Marks that a value is an accessory and should not, itself, cause the creation of a new archetype
proc attachable[T](builder: var ArchetypeBuilder[T]; values: openArray[T]; filter: BitsFilter)
- Describes components that can be attached to entities to create new archetypes
proc attachDetach[T](builder: var ArchetypeBuilder[T]; attach: openArray[T]; detach: openArray[T]; optDetach: openArray[T] = []; filter: BitsFilter = builder.filter([], []))
- Describes components that can be attached to entities to create new archetypes
proc build[T](builder: ArchetypeBuilder[T]): ArchetypeSet[T]
- Constructs the final set of archetypes
proc define[T](builder: var ArchetypeBuilder[T]; values: openArray[T])
- Adds a new archetype with specific values
proc detachable[T](builder: var ArchetypeBuilder[T]; values: openArray[T]; optional: openArray[T] = [])
- Describes components that can be detached from entities to create new archetypes
proc filter[T](builder: var ArchetypeBuilder[T]; mustContain: openArray[T]; mustExclude: openArray[T]): BitsFilter
proc hash(action: BuilderAction): Hash {....raises: [], tags: [], forbids: [].}
proc newArchetypeBuilder[T](): ArchetypeBuilder[T]
- Creates a new ArchetypeBuilder
Iterators
iterator allComponents[T](builder: ArchetypeBuilder[T]): T
- Yields all the components register in a builder
Exports
-
newArchetype, readableName, archArchSymbolDef, ident, dumpAnalysis, values, hasAccessories, containsAllOf, indexOf, items, ==, contains, containsAnyOf, hash, idSymbol, matches, newArchetypeSet, contains, $, len, Archetype, asStorageTuple, isAccessory, asTupleDir, archetypeFor, ArchetypeSet, calculateSize, removeAndAdd, items, hash, hash, $, ==