-
-
Notifications
You must be signed in to change notification settings - Fork 11
EntityIdentifierGenerator
ctreffs edited this page Oct 7, 2020
·
4 revisions
Entity Identifier Generator
public protocol EntityIdentifierGenerator
An entity identifier generator provides new entity identifiers on entity creation. It also allows entity ids to be marked as unused (to be re-usable).
You should strive to keep entity ids tightly packed around EntityIdentifier.Identifier.min
since it has an influence on the underlying memory layout.
Provides the next unused entity identifier.
func nextId() -> EntityIdentifier
The provided entity identifier must be unique during runtime.
Marks the given entity identifier as free and ready for re-use.
func markUnused(entityId: EntityIdentifier)
Unused entity identifiers will again be provided with nextId()
.
- entityId: The entity id to be marked as unused.
Generated at 2020-11-25T10:28:11+0000 using swift-doc 1.0.0-beta.5.
Types
- ComponentAdded
- ComponentIdentifier
- ComponentInstanceProvider
- ComponentRemoved
- ComponentSingletonProvider
- ComponentTypeProvider
- ComponentsBuilder.Context
- ComponentsBuilderPreview
- DefaultCodingStrategy
- DynamicCodingKey
- DynamicComponentProvider
- DynamicComponentProvider.Closure
- Entity
- Entity.ComponentsIterator
- EntityCreated
- EntityDestroyed
- EntityIdentifier
- EntityState
- EntityStateMachine
- Family
- Family.ComponentsIterator
- Family.EntityComponentIterator
- Family.EntityIterator
- FamilyMemberAdded
- FamilyMemberBuilderPreview
- FamilyMemberRemoved
- FamilyTraitSet
- LinearIncrementingEntityIdGenerator
- ManagedContiguousArray
- Nexus
- Nexus.EntitiesIterator
- Requires1
- Requires2
- Requires3
- Requires4
- Requires5
- Requires6
- Requires7
- Requires8
- Single
- StateComponentMapping
- StringHashing
- UnorderedSparseSet
- UnorderedSparseSet.ElementIterator
Protocols
- CodingStrategy
- Component
- ComponentProvider
- DefaultInitializable
- EntityIdentifierGenerator
- FamilyDecoding
- FamilyEncoding
- FamilyRequirementsManaging
- NexusEvent
- NexusEventDelegate
- RequiringComponents1
- RequiringComponents2
- RequiringComponents3
- RequiringComponents4
- RequiringComponents5
- RequiringComponents6
- RequiringComponents7
- RequiringComponents8
- SingleComponent
- TopLevelDecoder
- TopLevelEncoder