|
@@ -30,6 +30,7 @@ import com.badlogic.gdx.math.MathUtils;
|
|
|
import com.badlogic.gdx.utils.Array;
|
|
|
|
|
|
public class Animation {
|
|
|
+ private String name;
|
|
|
private final Array<Timeline> timelines;
|
|
|
private float duration;
|
|
|
|
|
@@ -76,6 +77,20 @@ public class Animation {
|
|
|
timelines.get(i).apply(skeleton, time, alpha);
|
|
|
}
|
|
|
|
|
|
+ /** @return May be null. */
|
|
|
+ public String getName () {
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** @param name May be null. */
|
|
|
+ public void setName (String name) {
|
|
|
+ this.name = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String toString () {
|
|
|
+ return name != null ? name : super.toString();
|
|
|
+ }
|
|
|
+
|
|
|
/** @param target After the first and before the last entry. */
|
|
|
static int binarySearch (float[] values, float target, int step) {
|
|
|
int low = 0;
|