summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java6
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);