diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-25 11:20:49 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-25 11:20:49 +0200 |
commit | 690ed876d2d03915013de15de626bffad52facba (patch) | |
tree | 50d3b63753a97065a4e1cf85cdb8abd22229beac /core | |
parent | c6756d41ed2861bfd802df097401bdd01e39bf19 (diff) | |
download | RustAndDust-690ed876d2d03915013de15de626bffad52facba.zip RustAndDust-690ed876d2d03915013de15de626bffad52facba.tar.gz |
Pawn, Unit: add int getAngleOfAttack()
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Unit.java | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index 90a3d15..32a20e0 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -27,6 +27,7 @@ public abstract class Pawn extends Image implements Disposable public abstract int getMvt(); public abstract int getRoadMarchBonus(); public abstract boolean isEnemy(Pawn other); + public abstract int getAngleOfAttack(); public Pawn(TextureRegion pawn, TextureAtlas overlays) { diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index dc857a6..cab86ce 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -31,6 +31,12 @@ public class Unit extends HeadedPawn } @Override + public int getAngleOfAttack() + { + return orientation.getFrontSides(); + } + + @Override public boolean isEnemy(Pawn other) { return army.isEnemy(((Unit) other).army); |