mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-08 06:06:43 +01:00
character: support custom frame duration
This commit is contained in:
parent
a74aa55409
commit
63f7ae39b9
1 changed files with 2 additions and 2 deletions
|
@ -412,9 +412,9 @@ SYMBOL_EXPORT void AnimateCharacter(struct Game* game, struct Character* charact
|
||||||
delta *= speed_modifier;
|
delta *= speed_modifier;
|
||||||
character->delta += delta * 1000;
|
character->delta += delta * 1000;
|
||||||
|
|
||||||
while (character->delta >= character->spritesheet->duration) {
|
while (character->delta >= character->frame->duration) {
|
||||||
bool reachedEnd = false;
|
bool reachedEnd = false;
|
||||||
character->delta -= character->spritesheet->duration;
|
character->delta -= character->frame->duration;
|
||||||
if (character->reversing) {
|
if (character->reversing) {
|
||||||
character->pos--;
|
character->pos--;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue