Mercurial > games > semicongine
changeset 313:210cab7958ab
add: reset for animation
author | Sam <sam@basx.dev> |
---|---|
date | Sun, 09 Jul 2023 17:07:36 +0700 |
parents | 2f5933af1ee4 |
children | 325823d1b61e |
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)