# HG changeset patch # User Sam # Date 1688897256 -25200 # Node ID 210cab7958ab11d114e559c9032c766855d6c2f5 # Parent 2f5933af1ee4f2dc0e2bfe1cd1750246101bb178 add: reset for animation diff -r 2f5933af1ee4 -r 210cab7958ab 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)