diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-09 11:44:52 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-09 11:44:52 +0200 |
commit | 5b4d135eed6ebe8a32c283677592eed6bb851e38 (patch) | |
tree | 71e364ba6b2a433a9a59c666e5453bf8dab6a213 /core/src/ch/asynk | |
parent | 87fb95a82dadd13ad30ac01a49c850c7ab80da85 (diff) | |
download | gdx-boardgame-5b4d135eed6ebe8a32c283677592eed6bb851e38.zip gdx-boardgame-5b4d135eed6ebe8a32c283677592eed6bb851e38.tar.gz |
clean up basic interfaces
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Drawable.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Paddable.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Positionable.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Rotable.java | 6 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Scalable.java | 2 |
5 files changed, 12 insertions, 2 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Drawable.java b/core/src/ch/asynk/gdx/boardgame/Drawable.java index 8c53e62..873e47f 100644 --- a/core/src/ch/asynk/gdx/boardgame/Drawable.java +++ b/core/src/ch/asynk/gdx/boardgame/Drawable.java @@ -6,5 +6,6 @@ import com.badlogic.gdx.graphics.glutils.ShapeRenderer; public interface Drawable { public void draw(Batch batch); + default public void setAlpha(float alpha) { } default public void drawDebug(ShapeRenderer debugShapes) { } } diff --git a/core/src/ch/asynk/gdx/boardgame/Paddable.java b/core/src/ch/asynk/gdx/boardgame/Paddable.java index 344c4ff..988d344 100644 --- a/core/src/ch/asynk/gdx/boardgame/Paddable.java +++ b/core/src/ch/asynk/gdx/boardgame/Paddable.java @@ -7,5 +7,6 @@ public interface Paddable public float getInnerWidth(); public float getInnerHeight(); public void setPadding(float padding); + public void setPosition(float x, float y, float w, float h); } diff --git a/core/src/ch/asynk/gdx/boardgame/Positionable.java b/core/src/ch/asynk/gdx/boardgame/Positionable.java index d16f5ce..30128ac 100644 --- a/core/src/ch/asynk/gdx/boardgame/Positionable.java +++ b/core/src/ch/asynk/gdx/boardgame/Positionable.java @@ -6,5 +6,7 @@ public interface Positionable public float getY(); public float getWidth(); public float getHeight(); - public void setPosition(float x, float y, float w, float h); + public void centerOn(float cx, float cy); + public void translate(float dx, float dy); + public void setPosition(float x, float y); } diff --git a/core/src/ch/asynk/gdx/boardgame/Rotable.java b/core/src/ch/asynk/gdx/boardgame/Rotable.java new file mode 100644 index 0000000..789ce3d --- /dev/null +++ b/core/src/ch/asynk/gdx/boardgame/Rotable.java @@ -0,0 +1,6 @@ +package ch.asynk.gdx.boardgame; + +public interface Rotable +{ + public void setRotation(float rotation); +} diff --git a/core/src/ch/asynk/gdx/boardgame/Scalable.java b/core/src/ch/asynk/gdx/boardgame/Scalable.java index cf430ca..3cf63be 100644 --- a/core/src/ch/asynk/gdx/boardgame/Scalable.java +++ b/core/src/ch/asynk/gdx/boardgame/Scalable.java @@ -1,6 +1,6 @@ package ch.asynk.gdx.boardgame; -public interface Scalable extends Drawable +public interface Scalable { public void setScale(float scale); } |