summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-21 17:02:27 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-21 17:02:27 +0100
commitdf8853df21b3e67a04f8e8e34d28ed9b097484ed (patch)
treead7bf89b1b6d659923bb673c59e1f7657f38bd08 /core/src/ch/asynk/tankontank
parentbb484b079fca679bf5fbf61439b6e1039cffac16 (diff)
downloadRustAndDust-df8853df21b3e67a04f8e8e34d28ed9b097484ed.zip
RustAndDust-df8853df21b3e67a04f8e8e34d28ed9b097484ed.tar.gz
Moveable: add Faction getFaction() to interface, Pawn implements it
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java6
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/Moveable.java3
2 files changed, 9 insertions, 0 deletions
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();
}