-
-
Notifications
You must be signed in to change notification settings - Fork 11
LinearIncrementingEntityIdGenerator
ctreffs edited this page Oct 7, 2020
·
2 revisions
Linear incrementing entity id generator
public struct LinearIncrementingEntityIdGenerator: EntityIdentifierGenerator
This entity id generator creates linearly incrementing entity ids unless an entity is marked as unused then the marked id is returned next in a FIFO order.
Furthermore it respects order of entity ids on initialization, meaning the provided ids on initialization will be provided in order until all are in use. After that the free entities start at the lowest available id increasing linearly skipping already in-use entity ids.
@inlinable public init<EntityIds>(startProviding initialEntityIds: EntityIds) where EntityIds: BidirectionalCollection, EntityIds.Element == EntityIdentifier
@inlinable public init()
@inline(__always) public func nextId() -> EntityIdentifier
@inline(__always) public func markUnused(entityId: EntityIdentifier)
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