From c9d131e5fb4d4cb5b1147d53e7dbe5baa9767eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 29 Oct 2014 00:57:50 +0100 Subject: Unit: add ATTACK_ASSIST overlay --- android/assets/data/pawn-overlays.atlas | 15 +++++++++++---- android/assets/data/pawn-overlays.png | Bin 22624 -> 33297 bytes core/src/ch/asynk/tankontank/game/Unit.java | 6 ++++++ data/assets/pawn-overlays/02_attack.png | Bin 3669 -> 6820 bytes data/assets/pawn-overlays/04_attack_assist.png | Bin 0 -> 3834 bytes 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 data/assets/pawn-overlays/04_attack_assist.png diff --git a/android/assets/data/pawn-overlays.atlas b/android/assets/data/pawn-overlays.atlas index 7a8bae8..882bb7b 100644 --- a/android/assets/data/pawn-overlays.atlas +++ b/android/assets/data/pawn-overlays.atlas @@ -12,14 +12,21 @@ repeat: none index: -1 02_attack rotate: false - xy: 234, 86 - size: 64, 64 - orig: 64, 64 + xy: 234, 152 + size: 90, 90 + orig: 90, 90 offset: 0, 0 index: -1 03_target rotate: false - xy: 234, 152 + xy: 234, 60 + size: 90, 90 + orig: 90, 90 + offset: 0, 0 + index: -1 +04_attack_assist + rotate: false + xy: 326, 152 size: 90, 90 orig: 90, 90 offset: 0, 0 diff --git a/android/assets/data/pawn-overlays.png b/android/assets/data/pawn-overlays.png index f040138..7132408 100644 Binary files a/android/assets/data/pawn-overlays.png and b/android/assets/data/pawn-overlays.png differ diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index 23a3248..11ab4e6 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -13,6 +13,7 @@ public class Unit extends HeadedPawn public static final int MOVE = 0; public static final int ATTACK = 1; public static final int TARGET = 2; + public static final int ATTACK_ASSIST = 3; public enum UnitType implements Pawn.PawnType { @@ -235,6 +236,11 @@ public class Unit extends HeadedPawn enableOverlay(ATTACK, enable); } + public void showAttackAssist(boolean enable) + { + enableOverlay(ATTACK_ASSIST, enable); + } + public void showTarget(boolean enable) { enableOverlay(TARGET, enable); diff --git a/data/assets/pawn-overlays/02_attack.png b/data/assets/pawn-overlays/02_attack.png index b46ca3e..a616530 100644 Binary files a/data/assets/pawn-overlays/02_attack.png and b/data/assets/pawn-overlays/02_attack.png differ diff --git a/data/assets/pawn-overlays/04_attack_assist.png b/data/assets/pawn-overlays/04_attack_assist.png new file mode 100644 index 0000000..7584dee Binary files /dev/null and b/data/assets/pawn-overlays/04_attack_assist.png differ -- cgit v1.1-2-g2b99