From df8853df21b3e67a04f8e8e34d28ed9b097484ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 21 Nov 2014 17:02:27 +0100 Subject: Moveable: add Faction getFaction() to interface, Pawn implements it --- core/src/ch/asynk/tankontank/engine/Pawn.java | 6 ++++++ core/src/ch/asynk/tankontank/engine/gfx/Moveable.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index 531b337..33c5f07 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -159,6 +159,12 @@ public abstract class Pawn implements Moveable, Disposable image.dispose(); } + @Override + public Faction getFaction() + { + return faction; + } + public void reset() { engagement.reset(); diff --git a/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java b/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java index 238305e..e9ac4cd 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java @@ -1,5 +1,7 @@ package ch.asynk.tankontank.engine.gfx; +import ch.asynk.tankontank.engine.Faction; + public interface Moveable extends Drawable { public float getX(); @@ -9,4 +11,5 @@ public interface Moveable extends Drawable public float getRotation(); public void setPosition(float x, float y); public void setPosition(float x, float y, float r); + public Faction getFaction(); } -- cgit v1.1-2-g2b99