ktx.artemis.transmuter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktx-artemis Show documentation
Show all versions of ktx-artemis Show documentation
Artemis-odb entity component system utilities for Kotlin libGDX applications.
The newest version!
package ktx.artemis
import com.artemis.Component
import com.artemis.EntityTransmuter
import com.artemis.EntityTransmuterFactory
/**
* Adds a [Component] to an [EntityTransmuterFactory].
*
* @receiver the [EntityTransmuterFactory] for creating an [EntityTransmuter].
* @param T the component to add when transmuting an entity.
* @return the [EntityTransmuterFactory].
*/
inline fun EntityTransmuterFactory.add(): EntityTransmuterFactory = add(T::class.java)
/**
* Removes a [Component] from an [EntityTransmuterFactory].
*
* @receiver the [EntityTransmuterFactory] for creating an [EntityTransmuter].
* @param T the component to remove when transmuting an entity.
* @return the [EntityTransmuterFactory].
*/
inline fun EntityTransmuterFactory.remove(): EntityTransmuterFactory = remove(T::class.java)