From 87bef5fc2936142336272413b9c924b638ae3425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 24 Sep 2014 12:27:50 +0200 Subject: Pawn and Unit: int getMvt() --- core/src/ch/asynk/tankontank/engine/Pawn.java | 2 ++ core/src/ch/asynk/tankontank/game/Unit.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index 2bc78e3..3d89676 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -24,6 +24,8 @@ public abstract class Pawn extends Image implements Disposable private StackedImages overlays; private ArrayDeque path = new ArrayDeque(); + public abstract int getMvt(); + public Pawn(TextureRegion region, TextureAtlas atlas) { super(region); diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index 316f664..4a9741a 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -15,6 +15,9 @@ public class Unit extends Pawn public boolean ht; public Army army; + @Override + public int getMvt() { return mp; } + // hard tager public Unit(Army army, boolean hq, int range, int defense, int movementPoints, TextureRegion region, TextureAtlas atlas) { -- cgit v1.1-2-g2b99