diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-06 00:02:22 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-06 00:02:22 +0200 |
commit | 9e246d84e31b8097bfbb72c7f0c7337d47df9e9e (patch) | |
tree | 25de30b83a7e5d4d84f3016ae1bd21790ef73f39 /core/src/ch/asynk/tankontank/engine/gfx | |
parent | 289d5150711e8b89be5caedeacb779ef277301c3 (diff) | |
download | RustAndDust-9e246d84e31b8097bfbb72c7f0c7337d47df9e9e.zip RustAndDust-9e246d84e31b8097bfbb72c7f0c7337d47df9e9e.tar.gz |
use ArrayList instead of Vector
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine/gfx')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/animations/AnimationSequence.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/AnimationSequence.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/AnimationSequence.java index 79cf021..9d5495a 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/animations/AnimationSequence.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/AnimationSequence.java @@ -1,6 +1,6 @@ package ch.asynk.tankontank.engine.gfx.animations; -import java.util.Vector; +import java.util.ArrayList; import com.badlogic.gdx.utils.Pool; @@ -9,7 +9,7 @@ import ch.asynk.tankontank.engine.gfx.Animation; public class AnimationSequence implements Animation, Pool.Poolable { - private Vector<Animation> animations; + private ArrayList<Animation> animations; private static final Pool<AnimationSequence> animationSequencePool = new Pool<AnimationSequence>() { @Override @@ -22,9 +22,9 @@ public class AnimationSequence implements Animation, Pool.Poolable { AnimationSequence seq = animationSequencePool.obtain(); if (seq.animations == null) - seq.animations = new Vector<Animation>(capacity); + seq.animations = new ArrayList<Animation>(capacity); else - seq.animations.setSize(capacity); + seq.animations.ensureCapacity(capacity); return seq; } @@ -61,7 +61,7 @@ public class AnimationSequence implements Animation, Pool.Poolable Animation animation = animations.get(0); if (animation.animate(delta)) { - animations.removeElementAt(0); + animations.remove(0); } return (animations.isEmpty()); |