Mercurial > games > semicongine
changeset 774:555b55e6b25b
add: reset for animation
author | Sam <sam@basx.dev> |
---|---|
date | Sun, 09 Jul 2023 17:07:36 +0700 |
parents | 3412b804f631 |
children | b4b3143e3626 |
files | src/semicongine/scene.nim |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)