diff options
Diffstat (limited to 'core/src/ch/asynk')
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(); + } } |