diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2025-10-23 21:59:37 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2025-10-24 20:00:58 -0700 |
| commit | 64f825465de9fa30c4dfe2707067efdb96110db8 (patch) | |
| tree | 5241385e316e2f4ceede5018603103d71be75202 /composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt | |
| download | abstraction-engine-kt-64f825465de9fa30c4dfe2707067efdb96110db8.tar.gz abstraction-engine-kt-64f825465de9fa30c4dfe2707067efdb96110db8.zip | |
Init
Diffstat (limited to 'composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt')
| -rw-r--r-- | composeApp/src/commonMain/kotlin/coffee/liz/ecs/System.kt | 22 |
1 files changed, 22 insertions, 0 deletions
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<KClass<out System>> + 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) +} |
