ktx.ashley.mappers.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktx-ashley Show documentation
Show all versions of ktx-ashley Show documentation
Ashley entity component system utilities for Kotlin LibGDX applications.
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