summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/engine/gfx
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-09 11:51:51 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-09 11:51:51 +0100
commitbb6a234d6631ad5bdf6f43b9ba101d133d3b2ee2 (patch)
tree75fd9547410eadb8e6bc1fda7d2190e6b1322ec1 /core/src/ch/asynk/rustanddust/engine/gfx
parent1619921f6acda0b328f10b34339c2ffd7f06d238 (diff)
downloadRustAndDust-bb6a234d6631ad5bdf6f43b9ba101d133d3b2ee2.zip
RustAndDust-bb6a234d6631ad5bdf6f43b9ba101d133d3b2ee2.tar.gz
use ArrayListIt
Diffstat (limited to 'core/src/ch/asynk/rustanddust/engine/gfx')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/gfx/animations/AnimationSequence.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/gfx/animations/AnimationSequence.java b/core/src/ch/asynk/rustanddust/engine/gfx/animations/AnimationSequence.java
index fdd1e80..d440adc 100644
--- a/core/src/ch/asynk/rustanddust/engine/gfx/animations/AnimationSequence.java
+++ b/core/src/ch/asynk/rustanddust/engine/gfx/animations/AnimationSequence.java
@@ -1,16 +1,15 @@
package ch.asynk.rustanddust.engine.gfx.animations;
-import java.util.ArrayList;
-
import com.badlogic.gdx.utils.Pool;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import ch.asynk.rustanddust.engine.gfx.Animation;
+import ch.asynk.rustanddust.engine.util.ArrayListIt;
public class AnimationSequence implements Animation, Pool.Poolable
{
- private ArrayList<Animation> animations;
+ private ArrayListIt<Animation> animations;
private static final Pool<AnimationSequence> animationSequencePool = new Pool<AnimationSequence>() {
@Override
@@ -23,7 +22,7 @@ public class AnimationSequence implements Animation, Pool.Poolable
{
AnimationSequence seq = animationSequencePool.obtain();
if (seq.animations == null)
- seq.animations = new ArrayList<Animation>(capacity);
+ seq.animations = new ArrayListIt<Animation>(capacity);
else
seq.animations.ensureCapacity(capacity);
@@ -33,8 +32,8 @@ public class AnimationSequence implements Animation, Pool.Poolable
@Override
public void reset()
{
- for (int i = 0, n = animations.size(); i < n; i++)
- animations.get(i).dispose();
+ for (Animation a : animations)
+ a.dispose();
animations.clear();
}