diff options
-rw-r--r-- | android/assets/data/tile-overlays.atlas | 14 | ||||
-rw-r--r-- | android/assets/data/tile-overlays.png | bin | 104203 -> 148404 bytes | |||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hex.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 32 | ||||
-rw-r--r-- | data/assets/tile-overlays/07_objective_ge.png | bin | 0 -> 21616 bytes | |||
-rw-r--r-- | data/assets/tile-overlays/08_objective_us.png | bin | 0 -> 28344 bytes |
6 files changed, 46 insertions, 4 deletions
diff --git a/android/assets/data/tile-overlays.atlas b/android/assets/data/tile-overlays.atlas index e2821ed..b466065 100644 --- a/android/assets/data/tile-overlays.atlas +++ b/android/assets/data/tile-overlays.atlas @@ -52,3 +52,17 @@ repeat: none orig: 190, 217 offset: 0, 0 index: -1 +07_objective_ge + rotate: false + xy: 618, 48 + size: 190, 217 + orig: 190, 217 + offset: 0, 0 + index: -1 +08_objective_us + rotate: false + xy: 810, 267 + size: 190, 217 + orig: 190, 217 + offset: 0, 0 + index: -1 diff --git a/android/assets/data/tile-overlays.png b/android/assets/data/tile-overlays.png Binary files differindex 10c9a3c..843ac93 100644 --- a/android/assets/data/tile-overlays.png +++ b/android/assets/data/tile-overlays.png diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java index 63f4422..019e02f 100644 --- a/core/src/ch/asynk/tankontank/game/Hex.java +++ b/core/src/ch/asynk/tankontank/game/Hex.java @@ -29,7 +29,9 @@ public class Hex extends Tile public static final int MOVE = 3; public static final int DIRECTIONS = 4; public static final int ORIENTATION = 5; - public static final int OBJECTIVE = 6; + public static final int OBJECTIVE = 6; // unclaimed + public static final int OBJECTIVE_GE= 7; + public static final int OBJECTIVE_US= 8; public Terrain terrain; public int roads; diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 878a7e3..15f73c8 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -380,9 +380,6 @@ public abstract class Map extends Board public void showPath(Hex dst) { possiblePaths.enable(Hex.MOVE, true); showMove(dst); } public void hidePath(Hex dst) { possiblePaths.enable(Hex.MOVE, false); hideMove(dst); } - public void showObjective(Hex hex) { enableOverlayOn(hex, Hex.OBJECTIVE, true); } - public void hideObjective(Hex hex) { enableOverlayOn(hex, Hex.OBJECTIVE, true); } - public void selectHex(Hex hex) { enableOverlayOn(hex, Hex.SELECT, true); } public void unselectHex(Hex hex) { enableOverlayOn(hex, Hex.SELECT, false); } public void showMove(Hex hex) { enableOverlayOn(hex, Hex.MOVE, true); } @@ -391,4 +388,33 @@ public abstract class Map extends Board public void hideDirections(Hex hex) { enableOverlayOn(hex, Hex.DIRECTIONS, false); } public void showOrientation(Hex hex, Orientation o) { enableOverlayOn(hex, Hex.ORIENTATION, o, true); } public void hideOrientation(Hex hex) { enableOverlayOn(hex, Hex.ORIENTATION, false); } + + public void hideObjective(Hex hex) + { + enableOverlayOn(hex, Hex.OBJECTIVE, false); + enableOverlayOn(hex, Hex.OBJECTIVE_US, false); + enableOverlayOn(hex, Hex.OBJECTIVE_GE, false); + } + + public void showObjective(Hex hex, Army army) + { + switch(army) { + case GE: + enableOverlayOn(hex, Hex.OBJECTIVE_GE, true); + enableOverlayOn(hex, Hex.OBJECTIVE_US, false); + enableOverlayOn(hex, Hex.OBJECTIVE, false); + break; + case US: + enableOverlayOn(hex, Hex.OBJECTIVE_GE, false); + enableOverlayOn(hex, Hex.OBJECTIVE_US, true); + enableOverlayOn(hex, Hex.OBJECTIVE, false); + break; + case NONE: + default: + enableOverlayOn(hex, Hex.OBJECTIVE_GE, false); + enableOverlayOn(hex, Hex.OBJECTIVE_US, false); + enableOverlayOn(hex, Hex.OBJECTIVE, true); + break; + } + } } diff --git a/data/assets/tile-overlays/07_objective_ge.png b/data/assets/tile-overlays/07_objective_ge.png Binary files differnew file mode 100644 index 0000000..a88a08e --- /dev/null +++ b/data/assets/tile-overlays/07_objective_ge.png diff --git a/data/assets/tile-overlays/08_objective_us.png b/data/assets/tile-overlays/08_objective_us.png Binary files differnew file mode 100644 index 0000000..156964d --- /dev/null +++ b/data/assets/tile-overlays/08_objective_us.png |