EntityType

value class EntityType

An inlined class used for tracking the components an entity/archetype has.

It provides fast (no boxing) functions backed by FastUtil sorted sets to do operations with ComponentIds.

Constructors

Link copied to clipboard
constructor()
constructor(ids: Collection<ComponentId>)

Functions

Link copied to clipboard
inline fun any(predicate: (ComponentId) -> Boolean): Boolean
Link copied to clipboard
tailrec fun binarySearch(id: ComponentId, fromIndex: Int = 0, toIndex: Int = inner.lastIndex): Int
Link copied to clipboard
operator fun contains(id: ComponentId): Boolean
Link copied to clipboard
inline fun filter(predicate: (ComponentId) -> Boolean): EntityType
Link copied to clipboard
Link copied to clipboard
inline fun forEach(run: (ComponentId) -> Unit)
Link copied to clipboard
inline fun forEachIndexed(run: (Int, ComponentId) -> Unit)
Link copied to clipboard
Link copied to clipboard
fun EntityType.hasRelationKind(kind: ComponentId, targetMustHoldData: Boolean = false): Boolean
Link copied to clipboard
fun EntityType.hasRelationTarget(target: EntityId, kindMustHoldData: Boolean = false): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> map(transform: (ULong) -> T): List<T>
Link copied to clipboard
operator fun minus(id: ComponentId): EntityType
Link copied to clipboard
operator fun plus(other: EntityType): EntityType
operator fun plus(id: ComponentId): EntityType
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
Link copied to clipboard
val size: Int