summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-13 00:29:48 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-13 00:29:48 +0200
commita7cc12cff89ec38bc3e1902f83bbd6efcf4121e4 (patch)
tree544c849848af087273616f733246bd06eb5cbb4c
parent821a6d96a5306fab7cb31211f587623af4f3925f (diff)
downloadRustAndDust-a7cc12cff89ec38bc3e1902f83bbd6efcf4121e4.zip
RustAndDust-a7cc12cff89ec38bc3e1902f83bbd6efcf4121e4.tar.gz
Board: add GridPoint2 getHexAt(Vector3, GridPoint2)
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 17632ff..7493059 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -570,6 +570,12 @@ public abstract class Board implements Disposable
return getHexAt(null, v.x, v.y);
}
+ public GridPoint2 getHexAt(Vector3 v, GridPoint2 hex)
+ {
+ if (v == null) return null;
+ return getHexAt(hex, v.x, v.y);
+ }
+
public GridPoint2 getHexAt(GridPoint2 hex, float mx, float my)
{
if (hex == null) hex = new GridPoint2();