diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-30 00:22:37 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-30 00:22:37 +0100 |
commit | df4ea901cc67c389d9327634622a2e83c606a7ce (patch) | |
tree | f69a2a2174d9038a19051c007daec8311aae19eb | |
parent | 8ce0d341aa7aa67cb2223169e9ba3e0cd8b0c97d (diff) | |
download | RustAndDust-df4ea901cc67c389d9327634622a2e83c606a7ce.zip RustAndDust-df4ea901cc67c389d9327634622a2e83c606a7ce.tar.gz |
ObjectiveSet,Map,Hex: visualy differenciate objectives that has to be hold and the others
-rw-r--r-- | android/assets/data/hex-overlays.atlas | 19 | ||||
-rw-r--r-- | android/assets/data/hex-overlays.png | bin | 126149 -> 128366 bytes | |||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hex.java | 7 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 12 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/ObjectiveSet.java | 2 | ||||
-rw-r--r-- | data/assets/hex-overlays/06_objective.png | bin | 23747 -> 24482 bytes | |||
-rw-r--r-- | data/assets/hex-overlays/07_hold_objective.png | bin | 0 -> 23747 bytes | |||
-rw-r--r-- | data/assets/hex-overlays/07_objective_ge.png | bin | 21616 -> 0 bytes | |||
-rw-r--r-- | data/assets/hex-overlays/08_objective_ge.png | bin | 0 -> 5861 bytes | |||
-rw-r--r-- | data/assets/hex-overlays/08_objective_us.png | bin | 28344 -> 0 bytes | |||
-rw-r--r-- | data/assets/hex-overlays/09_objective_us.png | bin | 0 -> 12159 bytes |
11 files changed, 23 insertions, 17 deletions
diff --git a/android/assets/data/hex-overlays.atlas b/android/assets/data/hex-overlays.atlas index f746f9f..72fae15 100644 --- a/android/assets/data/hex-overlays.atlas +++ b/android/assets/data/hex-overlays.atlas @@ -26,7 +26,7 @@ repeat: none index: -1 03_move rotate: false - xy: 810, 330 + xy: 618, 8 size: 100, 114 orig: 100, 114 offset: 0, 0 @@ -52,17 +52,24 @@ repeat: none orig: 190, 217 offset: 0, 0 index: -1 -07_objective_ge +07_hold_objective rotate: false xy: 618, 227 size: 190, 217 orig: 190, 217 offset: 0, 0 index: -1 -08_objective_us +08_objective_ge rotate: false - xy: 618, 8 - size: 190, 217 - orig: 190, 217 + xy: 618, 124 + size: 153, 101 + orig: 153, 101 + offset: 0, 0 + index: -1 +09_objective_us + rotate: false + xy: 810, 346 + size: 153, 98 + orig: 153, 98 offset: 0, 0 index: -1 diff --git a/android/assets/data/hex-overlays.png b/android/assets/data/hex-overlays.png Binary files differindex e4e8150..4a3a8ce 100644 --- a/android/assets/data/hex-overlays.png +++ b/android/assets/data/hex-overlays.png diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java index 0abd9d6..6e89df4 100644 --- a/core/src/ch/asynk/tankontank/game/Hex.java +++ b/core/src/ch/asynk/tankontank/game/Hex.java @@ -29,9 +29,10 @@ 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; // unclaimed - public static final int OBJECTIVE_GE= 7; - public static final int OBJECTIVE_US= 8; + public static final int OBJECTIVE = 6; + public static final int OBJECTIVE_HOLD = 7; + public static final int OBJECTIVE_GE = 8; + public static final int OBJECTIVE_US = 9; 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 b059aab..71f29c7 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -489,11 +489,12 @@ public abstract class Map extends Board 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) + public void showObjective(Hex hex, Army army, boolean hold) { - enableOverlayOn(hex, Hex.OBJECTIVE, false); - enableOverlayOn(hex, Hex.OBJECTIVE_US, false); - enableOverlayOn(hex, Hex.OBJECTIVE_GE, false); + if (hold) + enableOverlayOn(hex, Hex.OBJECTIVE_HOLD, true); + else + enableOverlayOn(hex, Hex.OBJECTIVE, true); } public void showObjective(Hex hex, Army army) @@ -502,18 +503,15 @@ public abstract class Map extends Board 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/core/src/ch/asynk/tankontank/game/ObjectiveSet.java b/core/src/ch/asynk/tankontank/game/ObjectiveSet.java index 2a4f3ee..ab827f6 100644 --- a/core/src/ch/asynk/tankontank/game/ObjectiveSet.java +++ b/core/src/ch/asynk/tankontank/game/ObjectiveSet.java @@ -21,7 +21,7 @@ public class ObjectiveSet extends HashMap<Hex, Objective> implements MoveToAnima public void add(Hex hex, Army army, boolean persistent) { put(hex, new Objective(army, persistent)); - map.showObjective(hex, army); + map.showObjective(hex, army, !persistent); } public int count(Army army) diff --git a/data/assets/hex-overlays/06_objective.png b/data/assets/hex-overlays/06_objective.png Binary files differindex e076771..11e5178 100644 --- a/data/assets/hex-overlays/06_objective.png +++ b/data/assets/hex-overlays/06_objective.png diff --git a/data/assets/hex-overlays/07_hold_objective.png b/data/assets/hex-overlays/07_hold_objective.png Binary files differnew file mode 100644 index 0000000..e076771 --- /dev/null +++ b/data/assets/hex-overlays/07_hold_objective.png diff --git a/data/assets/hex-overlays/07_objective_ge.png b/data/assets/hex-overlays/07_objective_ge.png Binary files differdeleted file mode 100644 index a88a08e..0000000 --- a/data/assets/hex-overlays/07_objective_ge.png +++ /dev/null diff --git a/data/assets/hex-overlays/08_objective_ge.png b/data/assets/hex-overlays/08_objective_ge.png Binary files differnew file mode 100644 index 0000000..076be81 --- /dev/null +++ b/data/assets/hex-overlays/08_objective_ge.png diff --git a/data/assets/hex-overlays/08_objective_us.png b/data/assets/hex-overlays/08_objective_us.png Binary files differdeleted file mode 100644 index 156964d..0000000 --- a/data/assets/hex-overlays/08_objective_us.png +++ /dev/null diff --git a/data/assets/hex-overlays/09_objective_us.png b/data/assets/hex-overlays/09_objective_us.png Binary files differnew file mode 100644 index 0000000..1f4b754 --- /dev/null +++ b/data/assets/hex-overlays/09_objective_us.png |