summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/Image.java4
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/Moveable.java24
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java2
3 files changed, 3 insertions, 27 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/Image.java b/core/src/ch/asynk/tankontank/engine/gfx/Image.java
index b7771ea..282e03b 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/Image.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/Image.java
@@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
-public class Image extends Sprite implements Moveable, Disposable
+public class Image extends Sprite implements Drawable, Disposable
{
private Texture texture;
@@ -32,14 +32,12 @@ public class Image extends Sprite implements Moveable, Disposable
if (texture != null) texture.dispose();
}
- @Override
public void setPosition(float x, float y, float r)
{
setPosition(x, y);
setRotation(r);
}
- @Override
public void centerOn(float cx, float cy)
{
setPosition((cx - (getWidth() / 2f)), (cy - (getHeight() / 2f)));
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java b/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java
deleted file mode 100644
index 55d5364..0000000
--- a/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package ch.asynk.tankontank.engine.gfx;
-
-public interface Moveable extends Drawable
-{
- public float getX();
-
- public float getY();
-
- public float getWidth();
-
- public float getHeight();
-
- public float getRotation();
-
- public void setRotation(float r);
-
- public void translate(float dx, float dy);
-
- public void centerOn(float cx, float cy);
-
- public void setPosition(float x, float y);
-
- public void setPosition(float x, float y, float r);
-}
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
index 4f72f76..70d91a9 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
@@ -61,6 +61,7 @@ public class StackedImages implements Drawable
}
}
+ @Override
public void draw(Batch batch)
{
for (int i = 0, n = sprites.size; i < n; i++) {
@@ -69,6 +70,7 @@ public class StackedImages implements Drawable
}
}
+ @Override
public void drawDebug(ShapeRenderer shapes)
{
Sprite sprite = sprites.get(0);