summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx/boardgame/Piece.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/gdx/boardgame/Piece.java')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Piece.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Piece.java b/core/src/ch/asynk/gdx/boardgame/Piece.java
index 275ea58..43bef04 100644
--- a/core/src/ch/asynk/gdx/boardgame/Piece.java
+++ b/core/src/ch/asynk/gdx/boardgame/Piece.java
@@ -18,6 +18,8 @@ import ch.asynk.gdx.boardgame.Tile;
public class Piece extends Sprite implements Drawable, Positionable, Rotable, Scalable
{
+ public static int angleCorrection = 0;
+
public Piece(Texture texture)
{
super(texture);
@@ -77,4 +79,14 @@ public class Piece extends Sprite implements Drawable, Positionable, Rotable, Sc
float h = getHeight();
shapeRenderer.rect(getX(), getY(), (w / 2f), (h / 2f), w, h, getScaleX(), getScaleY(), getRotation());
}
+
+ @Override public void setRotation(float r)
+ {
+ super.setRotation(r - angleCorrection);
+ }
+
+ @Override public float getRotation()
+ {
+ return super.getRotation() + angleCorrection;
+ }
}