summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-20 22:47:10 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-20 22:47:10 +0200
commit83d8f54a160fa4fdc2cd84705966acea2acb4888 (patch)
tree7ee2910f60fe1cbad9527f2c28d41bb0a5881cc0
parenta5009e8a3d312a53d54c842fbcdba1487662228a (diff)
downloadRustAndDust-83d8f54a160fa4fdc2cd84705966acea2acb4888.zip
RustAndDust-83d8f54a160fa4fdc2cd84705966acea2acb4888.tar.gz
split Drawable into Drawable and BasicDrawable
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java13
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/Drawable.java26
2 files changed, 21 insertions, 18 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java b/core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java
new file mode 100644
index 0000000..f143505
--- /dev/null
+++ b/core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java
@@ -0,0 +1,13 @@
+package ch.asynk.tankontank.engine.gfx;
+
+import com.badlogic.gdx.graphics.g2d.Batch;
+import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
+
+public interface BasicDrawable
+{
+ public void setPosition(float x, float y, float r);
+
+ public void draw(Batch batch, float parentAlpha);
+
+ public void drawDebug(ShapeRenderer debugShapes);
+}
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java b/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java
index 8f39e87..e5f1858 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/Drawable.java
@@ -1,32 +1,22 @@
package ch.asynk.tankontank.engine.gfx;
-import com.badlogic.gdx.graphics.g2d.Batch;
-import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
-import com.badlogic.gdx.utils.Disposable;
-
-public interface Drawable extends Disposable
+public interface Drawable extends BasicDrawable
{
- public float getWidth();
-
- public float getHeight();
-
public float getX();
public float getY();
- public float getRotation();
-
- public void setRotation(float r);
+ public float getWidth();
- public void setScale(float s);
+ public float getHeight();
- public void setPosition(float x, float y);
+ public float getRotation();
- public void moveBy(float dx, float dy);
+ public void setScale(float s);
- public void setCoords(float x, float y, float r);
+ public void setRotation(float r);
- public void draw(Batch batch, float parentAlpha);
+ public void translate(float dx, float dy);
- public void drawDebug(ShapeRenderer debugShapes);
+ public void setPosition(float x, float y);
}