Package-level declarations

Types

Link copied to clipboard
class MissingBaseSystemException(type: Class<out BaseSystem>) : GdxRuntimeException

Thrown when accessing an BaseSystem via getSystem that does not exist in the World.

Functions

Link copied to clipboard
inline fun <T : Component> ArchetypeBuilder.add(): ArchetypeBuilder

Adds a Component to an ArchetypeBuilder.

inline fun <T : Component> EntityTransmuterFactory.add(): EntityTransmuterFactory

Adds a Component to an EntityTransmuterFactory.

fun ArchetypeBuilder.add(vararg components: KClass<out Component>): ArchetypeBuilder

Adds multiple components to an ArchetypeBuilder.

Link copied to clipboard
fun allOf(vararg components: KClass<out Component>): Aspect.Builder

Includes entities to an Aspect if they have all the specified components.

Link copied to clipboard
fun Aspect.Builder.allOf(vararg components: KClass<out Component>): Aspect.Builder

Includes entities to an Aspect if they have all the specified components.

Link copied to clipboard
operator fun ComponentMapper<out Component>.contains(entityId: Int): Boolean

Checks if the entity has this type of Component.

Link copied to clipboard
inline fun World.edit(entityId: Int, entityEdit: EntityEdit.() -> Unit = {}): EntityEdit

Edits an entity.

Link copied to clipboard
inline fun World.entity(entityEdit: EntityEdit.() -> Unit = {}): Int
inline fun World.entity(archetype: Archetype, entityEdit: EntityEdit.() -> Unit = {}): Int

Creates and adds an entity to the World.

Link copied to clipboard
fun exclude(vararg components: KClass<out Component>): Aspect.Builder

Excludes entities from an Aspect if they have at least one of the specified components.

Link copied to clipboard
fun Aspect.Builder.exclude(vararg components: KClass<out Component>): Aspect.Builder

Excludes entities from an Aspect if they have at least one of the specified components.

Link copied to clipboard
operator fun <T : BaseSystem> World.get(type: KClass<T>): T?

Retrieves a system from the World.

Link copied to clipboard
inline fun <T : BaseSystem> World.getSystem(): T

Retrieves a system from the World.

Link copied to clipboard
inline fun <T : Component> World.mapperFor(): ComponentMapper<T>

Retrieves a ComponentMapper instance for a Component.

Link copied to clipboard
fun oneOf(vararg components: KClass<out Component>): Aspect.Builder

Includes entities to an Aspect if they have at least one of the specified components.

Link copied to clipboard
fun Aspect.Builder.oneOf(vararg components: KClass<out Component>): Aspect.Builder

Includes entities to an Aspect if they have at least one of the specified components.

Link copied to clipboard
operator fun EntityEdit.plusAssign(component: Component)

Adds a Component to the EntityEdit. The component gets replaced if it already exists.

Link copied to clipboard
inline fun <T : Component> ArchetypeBuilder.remove(): ArchetypeBuilder

Removes a Component from an ArchetypeBuilder.

inline fun <T : Component> EntityEdit.remove(): EntityEdit

Removes a Component from the EntityEdit.

inline fun <T : Component> EntityTransmuterFactory.remove(): EntityTransmuterFactory

Removes a Component from an EntityTransmuterFactory.

fun ArchetypeBuilder.remove(vararg components: KClass<out Component>): ArchetypeBuilder

Removes multiple components from an ArchetypeBuilder.

Link copied to clipboard
inline fun <T : Component> EntityEdit.with(componentEdit: T.() -> Unit = {}): EntityEdit

Adds or replaces a Component of the EntityEdit.