diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-15 21:25:21 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-15 21:25:21 +0200 |
commit | 402c933456df6a256e6846e9338bb940e7e229c8 (patch) | |
tree | 6feb754101586a71f535c31db107b140cdec948c /core/src/ch/asynk/tankontank/actors | |
parent | 89eff7909cc161df57a5ac0e0a126a2a2cd08237 (diff) | |
download | RustAndDust-402c933456df6a256e6846e9338bb940e7e229c8.zip RustAndDust-402c933456df6a256e6846e9338bb940e7e229c8.tar.gz |
add ugly selectedHex
Diffstat (limited to 'core/src/ch/asynk/tankontank/actors')
-rw-r--r-- | core/src/ch/asynk/tankontank/actors/HexMap.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/actors/HexMap.java b/core/src/ch/asynk/tankontank/actors/HexMap.java index 801ae2c..f5ac9ba 100644 --- a/core/src/ch/asynk/tankontank/actors/HexMap.java +++ b/core/src/ch/asynk/tankontank/actors/HexMap.java @@ -52,6 +52,14 @@ public class HexMap extends Image return st.getFirst(); } + public void setImageCenterAt(Image image, GridPoint2 cell) + { + float x = x0 + ((cell.x * w) + (w / 2)); + float y = y0 + ((cell.y * H) + (h / 2)); + if ((cell.y % 2) == 1) x += dw; + image.setCenterPosition(x, y); + } + public Vector2 getTilePosAt(Tile tile, GridPoint3 cell) { return getTilePosAt(tile, cell.x, cell.y); |