diff options
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/HeadedPawn.java | 12 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/Pawn.java | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java b/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java index c26610f..f60e38e 100644 --- a/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java +++ b/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java @@ -79,16 +79,20 @@ public abstract class HeadedPawn extends Pawn @Override public void draw(Batch batch) { - super.draw(batch); + sprite.draw(batch); head.draw(batch); + overlays.draw(batch); } @Override public void drawDebug(ShapeRenderer debugShapes) { - super.drawDebug(debugShapes); - float w = head.getWidth(); - float h = head.getHeight(); + float w = sprite.getWidth(); + float h = sprite.getHeight(); + debugShapes.rect(sprite.getX(), sprite.getY(), (w / 2f), (h / 2f), w, h, sprite.getScaleX(), sprite.getScaleY(), sprite.getRotation()); + w = head.getWidth(); + h = head.getHeight(); debugShapes.rect(head.getX(), head.getY(), (w / 2f), (h / 2f), w, h, head.getScaleX(), head.getScaleY(), head.getRotation()); + overlays.drawDebug(debugShapes); } } diff --git a/core/src/ch/asynk/rustanddust/engine/Pawn.java b/core/src/ch/asynk/rustanddust/engine/Pawn.java index fc20611..43de4f4 100644 --- a/core/src/ch/asynk/rustanddust/engine/Pawn.java +++ b/core/src/ch/asynk/rustanddust/engine/Pawn.java @@ -37,8 +37,8 @@ public abstract class Pawn implements Moveable, Disposable private Tile prevTile; protected Faction faction; protected String descr; - private Sprite sprite; - private StackedImages overlays; + protected Sprite sprite; + protected StackedImages overlays; protected Attack attack; protected Move move; |