Fixed lastTime being > time for non-looping animations.

This commit is contained in:
NathanSweet 2016-08-19 11:21:44 +02:00
parent 5191cf4f5f
commit b454d69b45

View File

@ -108,7 +108,10 @@ public class AnimationState {
float time = current.time, lastTime = current.lastTime, endTime = current.endTime, mix = current.alpha;
boolean loop = current.loop;
if (!loop && time > endTime) time = endTime;
if (!loop) {
if (time > endTime) time = endTime;
if (lastTime > endTime) lastTime = endTime;
}
if (current.previous != null) {
mix *= current.mixTime / current.mixDuration;