From 88625f9628deaa6e17f1bc5b352dffc60391fb7f Mon Sep 17 00:00:00 2001 From: Guillermo Andrades Date: Thu, 10 Jan 2013 10:48:43 +0100 Subject: [PATCH] Modified isAnimationFinished when looping Always return false if the current animation is looping --- gdx/src/com/badlogic/gdx/graphics/g2d/Animation.java | 1 + 1 file changed, 1 insertion(+) diff --git a/gdx/src/com/badlogic/gdx/graphics/g2d/Animation.java b/gdx/src/com/badlogic/gdx/graphics/g2d/Animation.java index ac28d8b53..846c5a198 100644 --- a/gdx/src/com/badlogic/gdx/graphics/g2d/Animation.java +++ b/gdx/src/com/badlogic/gdx/graphics/g2d/Animation.java @@ -167,6 +167,7 @@ public class Animation { * @param stateTime * @return whether the animation is finished. */ public boolean isAnimationFinished (float stateTime) { + if(playMode != NORMAL && playMode != REVERSED) return false; int frameNumber = (int)(stateTime / frameDuration); return keyFrames.length - 1 < frameNumber; } -- 2.11.0