summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine/gfx')
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java2
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/Drawable.java2
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java8
3 files changed, 10 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java b/core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java
index f143505..776ac22 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java
@@ -5,6 +5,8 @@ import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
public interface BasicDrawable
{
+ public void translate(float dx, float dy);
+
public void setPosition(float x, float y, float r);
public void draw(Batch batch, float parentAlpha);
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java b/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java
index e5f1858..ca749be 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java
@@ -16,7 +16,5 @@ public interface Drawable extends BasicDrawable
public void setRotation(float r);
- public void translate(float dx, float dy);
-
public void setPosition(float x, float y);
}
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
index 8e450ad..5eb5e55 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
@@ -30,6 +30,14 @@ public class StackedImages implements BasicDrawable
}
@Override
+ public void translate(float x, float y)
+ {
+ for (int i = 0; i < sprites.size; i++) {
+ sprites.get(i).translate(x, y);
+ }
+ }
+
+ @Override
public void setPosition(float x, float y, float r)
{
for (int i = 0; i < sprites.size; i++) {