v3.1.1: various stability improvements for low/inconsistent FPS:
- game now has a max delta time of 200ms - added some checks to ensure non-looped animations do not complete twice - adjusted 'enemy' reference in hero to 'attackTarget'
This commit is contained in:
@@ -63,9 +63,11 @@ public class MovieClip extends Image {
|
||||
while (frameTimer > curAnim.delay) {
|
||||
frameTimer -= curAnim.delay;
|
||||
if (curFrame >= curAnim.frames.length - 1) {
|
||||
curFrame = curAnim.frames.length - 1;
|
||||
if (curAnim.looped) {
|
||||
curFrame = 0;
|
||||
} else {
|
||||
curFrame = curAnim.frames.length - 1;
|
||||
frameTimer = 0;
|
||||
}
|
||||
finished = true;
|
||||
if (listener != null) {
|
||||
|
||||
Reference in New Issue
Block a user