fix animation looping bug

This commit is contained in:
Nick Fisher
2023-08-24 00:57:33 +08:00
parent 03dd2cf6ac
commit 7687e54a0d
3 changed files with 13 additions and 15 deletions

View File

@@ -303,6 +303,9 @@ void AssetManager::updateAnimations() {
break;
}
}
if(anim.mLoop && elapsed >= anim.mDuration) {
anim.mStart = now;
}
// animation has completed
} else {
completed.push_back(anim);