# HG changeset patch # User Sam # Date 1688897256 -25200 # Node ID 555b55e6b25bfcb92640eb4356dfbbf76feda19b # Parent 3412b804f6310dc9423aab251344b22c2c5dc26a add: reset for animation diff -r 3412b804f631 -r 555b55e6b25b src/semicongine/scene.nim --- a/src/semicongine/scene.nim Sun Jul 09 16:40:58 2023 +0700 +++ b/src/semicongine/scene.nim Sun Jul 09 17:07:36 2023 +0700 @@ -48,6 +48,10 @@ func stop*(animation: EntityAnimation) = animation.player.stop() +func reset*(animation: EntityAnimation) = + animation.player.stop() + animation.player.resetPlayer() + func update*(animation: EntityAnimation, dt: float32) = animation.player.advance(dt)