From a8e5e723b7e1891c9b352261a3ee4c3d3563e8cf Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 26 Oct 2025 21:38:22 -0700 Subject: Checkpoint two --- .../kotlin/coffee/liz/ecs/physics/IntegrationTick.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'composeApp/src/commonMain/kotlin/coffee/liz/ecs/physics/IntegrationTick.kt') diff --git a/composeApp/src/commonMain/kotlin/coffee/liz/ecs/physics/IntegrationTick.kt b/composeApp/src/commonMain/kotlin/coffee/liz/ecs/physics/IntegrationTick.kt index 03af835..c3484ae 100644 --- a/composeApp/src/commonMain/kotlin/coffee/liz/ecs/physics/IntegrationTick.kt +++ b/composeApp/src/commonMain/kotlin/coffee/liz/ecs/physics/IntegrationTick.kt @@ -2,15 +2,15 @@ package coffee.liz.ecs.physics import coffee.liz.ecs.World -internal class IntegrationTick { - fun runTick(world: World) { +internal class IntegrationTick : PhysicsTick { + override fun runTick(world: World) { world.query(Velocity::class, Acceleration::class).forEach { entity -> val velocity = entity.get(Velocity::class) val acceleration = entity.get(Acceleration::class) entity.add( Velocity( - vec2 = velocity.vec2.plus(acceleration.vec2) - ) + vec2 = velocity.vec2.plus(acceleration.vec2), + ), ) } @@ -19,9 +19,9 @@ internal class IntegrationTick { val velocity = entity.get(Acceleration::class) entity.add( Position( - vec2 = position.vec2.plus(velocity.vec2) - ) + vec2 = position.vec2.plus(velocity.vec2), + ), ) } } -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2