fix animation looping bug

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

No files matched your search

+3
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);