From c2e64f707b8d8fc6f2b6885dc3ea0a95122ab71b Mon Sep 17 00:00:00 2001 From: Simon Klausner Date: Mon, 16 Oct 2023 16:44:59 +0200 Subject: [PATCH] add noargs Snapshot constructor for serialization --- src/commonMain/kotlin/com/github/quillraven/fleks/world.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/com/github/quillraven/fleks/world.kt b/src/commonMain/kotlin/com/github/quillraven/fleks/world.kt index e08228b..6f11ab8 100644 --- a/src/commonMain/kotlin/com/github/quillraven/fleks/world.kt +++ b/src/commonMain/kotlin/com/github/quillraven/fleks/world.kt @@ -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>, val tags: List>) +data class Snapshot( + val components: List> = listOf(), + val tags: List> = listOf(), +) /** * A world to handle [entities][Entity] and [systems][IntervalSystem].