# HG changeset patch # User Sam # Date 1688895658 -25200 # Node ID 2f5933af1ee4f2dc0e2bfe1cd1750246101bb178 # Parent 01f96ae71681195cf96b58a15faa2319af55bc89 del: unnecessary var diff -r 01f96ae71681 -r 2f5933af1ee4 src/semicongine/scene.nim --- a/src/semicongine/scene.nim Sun Jul 09 00:47:18 2023 +0700 +++ b/src/semicongine/scene.nim Sun Jul 09 16:40:58 2023 +0700 @@ -42,13 +42,13 @@ entityAnimation.player.animation = animation entityAnimation.player.resetPlayer() -func start*(animation: var EntityAnimation) = +func start*(animation: EntityAnimation) = animation.player.start() -func stop*(animation: var EntityAnimation) = +func stop*(animation: EntityAnimation) = animation.player.stop() -func update*(animation: var EntityAnimation, dt: float32) = +func update*(animation: EntityAnimation, dt: float32) = animation.player.advance(dt) func parent(entity: Entity): Entity = @@ -136,7 +136,7 @@ proc add*(entity: Entity, child: Entity) = child.parent = entity entity.children.add child -proc `[]=`*[T](entity: var Entity, index: int, child: var T) = +proc `[]=`*[T](entity: Entity, index: int, child: var T) = child.parent = entity entity.children[index] = child proc `[]`*(entity: Entity, index: int): Entity =