From 64f825465de9fa30c4dfe2707067efdb96110db8 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Thu, 23 Oct 2025 21:59:37 -0700 Subject: Init --- .../src/commonMain/kotlin/coffee/liz/ecs/System.kt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt (limited to 'composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt') diff --git a/composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt b/composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt new file mode 100644 index 0000000..0f8ef2a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt @@ -0,0 +1,22 @@ +package coffee.liz.ecs + +import kotlin.reflect.KClass + +/** + * Systems contain the logic that operates on entities with specific components. + */ +interface System { + /** + * Systems that must run before this system in the update loop. + * Used to construct a dependency DAG. + */ + val dependencies: Set> + get() = emptySet() + + /** + * Update this system. Called once per frame. + * @param world The world containing entities and systems + * @param deltaTime Time elapsed since last update in seconds + */ + fun update(world: World, deltaTime: Float) +} -- cgit v1.2.3-70-g09d2