All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ktx.ashley.mappers.kt Maven / Gradle / Ivy

There is a newer version: 1.12.1-rc2
Show newest version
package ktx.ashley

import com.badlogic.ashley.core.Component
import com.badlogic.ashley.core.ComponentMapper

/**
 * Creates a [ComponentMapper] for the specified [Component] type.
 *
 * Provides `O(1)` retrieval of [Component]s for an [com.badlogic.ashley.core.Entity].
 *
 * @param T the [Component] type to create a [ComponentMapper] for.
 * @return a [ComponentMapper] matching the selected component type.
 * @see ComponentMapper
 * @see Component
 */
inline fun  mapperFor(): ComponentMapper = ComponentMapper.getFor(T::class.java)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy