summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-20 22:52:11 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-20 22:52:11 +0200
commite9f3fc566de707977c7b8bda2056e6c4c409f1f6 (patch)
treec6bb64c6752a69e81e1f6e23f551c0e15ad1f458 /core/src
parentfd7ea8aebcf7b3bbc2cb441a971df8cc2fe37d1f (diff)
downloadRustAndDust-e9f3fc566de707977c7b8bda2056e6c4c409f1f6.zip
RustAndDust-e9f3fc566de707977c7b8bda2056e6c4c409f1f6.tar.gz
fix StackedSpriteNode : implements BasicDrawable
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/StackedSpriteNode.java84
1 files changed, 2 insertions, 82 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/StackedSpriteNode.java b/core/src/ch/asynk/tankontank/engine/gfx/StackedSpriteNode.java
index c176461..f3f840b 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/StackedSpriteNode.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/StackedSpriteNode.java
@@ -6,11 +6,8 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.utils.Array;
-import ch.asynk.tankontank.engine.Layer;
-
-public class StackedSpriteNode implements Node
+public class StackedSpriteNode implements BasicDrawable
{
- private Layer layer;
private boolean enabled[];
private Array<Sprite> sprites;
@@ -26,84 +23,7 @@ public class StackedSpriteNode implements Node
}
@Override
- public void dispose()
- {
- }
-
- @Override
- public void setLayer(Layer layer) {
- this.layer = layer;
- }
-
- @Override
- public void clear()
- {
- // FIXME : clear StackedSpriteNode
- }
-
- @Override
- public void act(float delta) { }
-
- @Override
- public float getX()
- {
- return sprites.get(0).getX();
- }
-
- @Override
- public float getY()
- {
- return sprites.get(0).getY();
- }
-
- @Override
- public float getWidth()
- {
- return sprites.get(0).getWidth();
- }
-
- @Override
- public float getHeight()
- {
- return sprites.get(0).getHeight();
- }
-
- @Override
- public float getRotation()
- {
- return sprites.get(0).getRotation();
- }
-
- @Override
- public void setScale(float s)
- {
- for (int i = 0; i < sprites.size; i++)
- sprites.get(i).setScale(s);
- }
-
- @Override
- public void moveBy(float dx, float dy)
- {
- for (int i = 0; i < sprites.size; i++)
- sprites.get(i).translate(dx, dy);
- }
-
- @Override
- public void setRotation(float r)
- {
- for (int i = 0; i < sprites.size; i++)
- sprites.get(i).setRotation(r);
- }
-
- @Override
- public void setPosition(float x, float y)
- {
- for (int i = 0; i < sprites.size; i++)
- sprites.get(i).setPosition(x, y);
- }
-
- @Override
- public void setCoords(float x, float y, float r)
+ public void setPosition(float x, float y, float r)
{
for (int i = 0; i < sprites.size; i++) {
sprites.get(i).setPosition(x, y);