reset animation object before calling animation function in case the animation function reenables the animation
This commit is contained in:
parent
1fff973b46
commit
923c805fe5
|
@ -77,11 +77,11 @@ bool Animation::update(float timestamp)
|
|||
{
|
||||
overflow = timer.elapsed() - previous_step_time + overflow - _frame_length;
|
||||
previous_step_time = timer.elapsed();
|
||||
step();
|
||||
if (ending)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
step();
|
||||
if (overflow > _frame_length)
|
||||
{
|
||||
overflow = 0;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
____/ \____ /| - Open source game framework licensed to freely use, |
|
||||
\ / / | copy, modify and sell without restriction |
|
||||
+--\ ^__^ /--+ | |
|
||||
| ~/ \~ | | - created for <https://foam.shampoo.ooo> |
|
||||
| ~/ \~ | | - created for <https://foam.ooo> |
|
||||
| ~~~~~~~~~~~~ | +------------------------------------------------------+
|
||||
| SPACE ~~~~~ | /
|
||||
| ~~~~~~~ BOX |/
|
||||
|
|
Loading…
Reference in New Issue