# HG changeset patch # User Sam # Date 1688895658 -25200 # Node ID 3412b804f6310dc9423aab251344b22c2c5dc26a # Parent 5d248fcfddf60e85756ff1b0267821c9ad4455cf del: unnecessary var diff -r 5d248fcfddf6 -r 3412b804f631 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 =