Skip to content

KECS / com.juanmedina.kecs.entity / View / entity

entity

fun entity(vararg types:KClass<outAny>):Entity

Return a single Entity that has a component of the giving types, or throws exception if there is more than one.

Parameters

types - Component classes such Position::classfun <reified T :Any> entity():Entity

Return a single Entity that has a component of the giving type, or throws exception if there is more than one.