diff options
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/BasicDrawable.java | 13 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/Drawable.java | 26 |
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); } |