diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-03 01:42:43 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-03 01:42:43 +0100 |
commit | dcdbe66bc9127b7d21c107bfa533603ea01368eb (patch) | |
tree | fa61e1d94528571e7fc1efaea00207d38ba8ef90 | |
parent | 6bc5dea7b551f18fee16cd6f66256eef3caf0441 (diff) | |
download | RustAndDust-dcdbe66bc9127b7d21c107bfa533603ea01368eb.zip RustAndDust-dcdbe66bc9127b7d21c107bfa533603ea01368eb.tar.gz |
animations/Sprites implements Disposable
4 files changed, 12 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java index ead140c..6610997 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/DiceAnimation.java @@ -55,7 +55,7 @@ public class DiceAnimation implements Animation, Drawable public static void free() { sound.dispose(); - dice.texture.dispose(); + dice.dispose(); } public float getX() diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java index 4a47805..0b2cce5 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/ShotAnimation.java @@ -97,8 +97,8 @@ public class ShotAnimation implements Disposable, Animation, Pool.Poolable shotSndLong.dispose(); explosionSnd.dispose(); explosionSndLong.dispose(); - shot.texture.dispose(); - explosion.texture.dispose(); + shot.dispose(); + explosion.dispose(); } public ShotAnimation() diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/SpriteAnimation.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/SpriteAnimation.java index 714323d..7a94810 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/animations/SpriteAnimation.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/SpriteAnimation.java @@ -34,7 +34,7 @@ public class SpriteAnimation implements Disposable, Animation @Override public void dispose() { - sprites.texture.dispose(); + sprites.dispose(); } public void init(float duration, float x, float y) diff --git a/core/src/ch/asynk/tankontank/engine/gfx/animations/Sprites.java b/core/src/ch/asynk/tankontank/engine/gfx/animations/Sprites.java index 8418965..a3bf2a4 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/animations/Sprites.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/animations/Sprites.java @@ -1,9 +1,10 @@ package ch.asynk.tankontank.engine.gfx.animations; +import com.badlogic.gdx.utils.Disposable; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.TextureRegion; -public class Sprites +public class Sprites implements Disposable { public Texture texture; public TextureRegion[] frames; @@ -28,4 +29,10 @@ public class Sprites } } } + + @Override + public void dispose() + { + texture.dispose(); + } } |