Quillraven / Fleks

Fast, lightweight, multi-platform entity component system in Kotlin
MIT License
174 stars 19 forks source link

(#137) optimize family notifications for world.entity and entity.configure #138

Closed Quillraven closed 5 months ago

Quillraven commented 5 months ago

PR for #137: FamilyHook notifications are only called once for an entity within nested calls like:

// 1
world.entity {
  // it.configure will not trigger family notifications for that entity anymore. They are triggered at the end of world.entity
  it.configure {

  }
}

// 2
entity.configure{
  // it.configure will not trigger family notifications for that entity anymore. They are triggered at the end of the first entity.configure call
  it.configure{

  }
}