diff options
-rw-r--r-- | android/assets/data/unit-overlays.atlas | 28 | ||||
-rw-r--r-- | android/assets/data/unit-overlays.png | bin | 66448 -> 71361 bytes | |||
-rw-r--r-- | assets/unit-overlays/06_fired.png | bin | 0 -> 361 bytes | |||
-rw-r--r-- | assets/unit-overlays/07_moved.png | bin | 0 -> 353 bytes | |||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Unit.java | 10 |
5 files changed, 31 insertions, 7 deletions
diff --git a/android/assets/data/unit-overlays.atlas b/android/assets/data/unit-overlays.atlas index 580baa7..fe8f966 100644 --- a/android/assets/data/unit-overlays.atlas +++ b/android/assets/data/unit-overlays.atlas @@ -1,48 +1,62 @@ unit-overlays.png -size: 512,256 +size: 1024,256 format: RGBA8888 filter: Nearest,Nearest repeat: none 00_move rotate: false - xy: 2, 27 + xy: 2, 2 size: 190, 217 orig: 190, 217 offset: 0, 0 index: -1 01_target rotate: false - xy: 194, 2 + xy: 749, 129 size: 90, 90 orig: 90, 90 offset: 0, 0 index: -1 02_fire rotate: false - xy: 194, 94 + xy: 194, 69 size: 100, 150 orig: 100, 150 offset: 0, 0 index: -1 03_may_fire rotate: false - xy: 296, 94 + xy: 296, 69 size: 100, 150 orig: 100, 150 offset: 0, 0 index: -1 04_ace rotate: false - xy: 460, 40 + xy: 712, 15 size: 35, 204 orig: 35, 204 offset: 0, 0 index: -1 05_hq rotate: false - xy: 398, 72 + xy: 650, 47 size: 60, 172 orig: 60, 172 offset: 0, 0 index: -1 +06_fired + rotate: false + xy: 398, 95 + size: 124, 124 + orig: 124, 124 + offset: 0, 0 + index: -1 +07_moved + rotate: false + xy: 524, 95 + size: 124, 124 + orig: 124, 124 + offset: 0, 0 + index: -1 diff --git a/android/assets/data/unit-overlays.png b/android/assets/data/unit-overlays.png Binary files differindex 5949dd1..e581b78 100644 --- a/android/assets/data/unit-overlays.png +++ b/android/assets/data/unit-overlays.png diff --git a/assets/unit-overlays/06_fired.png b/assets/unit-overlays/06_fired.png Binary files differnew file mode 100644 index 0000000..b03d25e --- /dev/null +++ b/assets/unit-overlays/06_fired.png diff --git a/assets/unit-overlays/07_moved.png b/assets/unit-overlays/07_moved.png Binary files differnew file mode 100644 index 0000000..bc01362 --- /dev/null +++ b/assets/unit-overlays/07_moved.png diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index 0f94cdd..12cac1f 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -19,6 +19,8 @@ public class Unit extends HeadedPawn public static final int MAY_FIRE = 3; public static final int ACE = 4; public static final int HQ = 5; + public static final int HAS_FIRED = 6; + public static final int HAS_MOVED = 7; public static final int FLANK_ATTACK_BONUS = 1; @@ -286,6 +288,7 @@ public class Unit extends HeadedPawn public void setMoved() { hasMoved = true; + showHasMoved(); } @Override @@ -305,6 +308,7 @@ public class Unit extends HeadedPawn { TankOnTank.debug(engagement.toString()); hasFired = true; + showHasFired(); } @Override @@ -314,6 +318,8 @@ public class Unit extends HeadedPawn mpLeft = mp; hasFired = false; hasMoved = false; + hideHasMoved(); + hideHasFired(); } @Override @@ -333,4 +339,8 @@ public class Unit extends HeadedPawn public void hideAttack() { enableOverlay(FIRE, false); } public void showAttackAssist() { enableOverlay(MAY_FIRE, true); } public void hideAttackAssist() { enableOverlay(MAY_FIRE, false); } + public void showHasMoved() { enableOverlay(HAS_MOVED, true); } + public void hideHasMoved() { enableOverlay(HAS_MOVED, false); } + public void showHasFired() { enableOverlay(HAS_FIRED, true); } + public void hideHasFired() { enableOverlay(HAS_FIRED, false); } } |