NathanSweet 12 rokov pred
rodič
commit
d07321c9e7

+ 5 - 1
spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

@@ -27,7 +27,7 @@ package com.esotericsoftware.spine;
 
 import com.badlogic.gdx.math.MathUtils;
 
-/** Automatically mixes between animations as they change. */
+/** Stores state for an animation and automatically mixes between animations. */
 public class AnimationState {
 	private final AnimationStateData data;
 	Animation current, previous;
@@ -88,6 +88,10 @@ public class AnimationState {
 		return currentTime;
 	}
 
+	public void setTime (float time) {
+		currentTime = time;
+	}
+
 	public AnimationStateData getData () {
 		return data;
 	}