summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-20 22:51:45 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-20 22:51:45 +0200
commitfd7ea8aebcf7b3bbc2cb441a971df8cc2fe37d1f (patch)
treed8a20d296e62dc09443dbe91fe5940897c026abb /core/src/ch/asynk/tankontank
parent496673b234410921dd336c78dc711a8f354c07cd (diff)
downloadRustAndDust-fd7ea8aebcf7b3bbc2cb441a971df8cc2fe37d1f.zip
RustAndDust-fd7ea8aebcf7b3bbc2cb441a971df8cc2fe37d1f.tar.gz
fix SpriteNode : extends Sprite implements Node
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/SpriteNode.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/SpriteNode.java b/core/src/ch/asynk/tankontank/engine/gfx/SpriteNode.java
index f714203..dd1c648 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/SpriteNode.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/SpriteNode.java
@@ -7,30 +7,28 @@ import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
public abstract class SpriteNode extends Sprite implements Node
{
+ private Texture texture;
+
public SpriteNode(Texture texture)
{
super(texture);
+ this.texture = texture;
}
public SpriteNode(TextureRegion region)
{
super(region);
+ this.texture = null;
}
@Override
public void dispose()
{
- // FIXME : what to do with dispose in SpriteNode
- }
-
- @Override
- public void moveBy(float dx, float dy)
- {
- translate(dx, dy);
+ if (texture != null) texture.dispose();
}
@Override
- public void setCoords(float x, float y, float r)
+ public void setPosition(float x, float y, float r)
{
setPosition(x, y);
setRotation(r);