From 21d63cd228899cc98ecbe55d652f22118ec8b78f Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Fri, 21 Oct 2016 21:04:49 +0200 Subject: [PATCH] Fixed TranslateTime mixing. --- .../src/com/esotericsoftware/spine/Animation.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java index 72cedc734..77db30202 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java @@ -63,13 +63,8 @@ public class Animation { this.duration = duration; } - /** Poses the skeleton at the specified time for this animation mixed with the current or setup pose. - * @param lastTime The last time the animation was applied. - * @param events Any triggered events are added. May be null. - * @param alpha The percentage between this animation's pose and the current pose. - * @param setupPose If true, the animation is mixed with the setup pose, else it is mixed with the current pose. Passing true - * when alpha is 1 is slightly more efficient. - * @param mixingOut True when mixing over time toward the setup or current pose, false when mixing toward the keyed pose. */ + /** Applies all the animation's timelines to the specified skeleton. + * @see Timeline#apply(Skeleton, float, float, Array, float, boolean, boolean) */ public void apply (Skeleton skeleton, float lastTime, float time, boolean loop, Array events, float alpha, boolean setupPose, boolean mixingOut) { if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null."); @@ -380,8 +375,8 @@ public class Animation { bone.x = bone.data.x + x * alpha; bone.y = bone.data.y + y * alpha; } else { - bone.x += bone.data.x + (x - bone.x) * alpha; - bone.y += bone.data.y + (y - bone.y) * alpha; + bone.x += (bone.data.x + x - bone.x) * alpha; + bone.y += (bone.data.y + y - bone.y) * alpha; } } }