package coffee.liz.ecs import kotlin.reflect.KClass import kotlin.time.Duration /** * [World] is the state of the world. * @param Outside is the state of the stuff outside the world (input, etc.). */ interface World { /** * Create unique [Entity] in the [World]. */ fun createEntity(): Entity /** * Remove [entity] from [World]. */ fun removeEntity(entity: Entity) /** * Get entities with a [Component] type. */ fun query(vararg componentTypes: KClass): Set /** * Integrate the [World]. */ fun update( state: Outside, deltaTime: Duration, ) }