Skip to content

Commit

Permalink
add noargs Snapshot constructor for serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Klausner committed Oct 16, 2023
1 parent 1ec13e8 commit c2e64f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commonMain/kotlin/com/github/quillraven/fleks/world.kt
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ fun configureWorld(entityCapacity: Int = 512, cfg: WorldConfiguration.() -> Unit
/**
* Snapshot for an [entity][Entity] that contains its [components][Component] and [tags][EntityTag].
*/
data class Snapshot(val components: List<Component<*>>, val tags: List<UniqueId<*>>)
data class Snapshot(
val components: List<Component<*>> = listOf(),
val tags: List<UniqueId<*>> = listOf(),
)

/**
* A world to handle [entities][Entity] and [systems][IntervalSystem].
Expand Down

0 comments on commit c2e64f7

Please sign in to comment.