summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 9a2fcc1..a3b0a26 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -26,6 +26,7 @@ public abstract class Pawn implements Drawable, Disposable
private Vector3 position = new Vector3(0f, 0f, 0f);
private Vector3 prevPosition = new Vector3(0f, 0f, 0f);
+ private String name;
private Image image;
private StackedImages overlays;
@@ -54,13 +55,20 @@ public abstract class Pawn implements Drawable, Disposable
{
}
- public Pawn(TextureAtlas atlas, String pawn)
+ public Pawn(TextureAtlas atlas, String name)
{
- image = new Image(atlas.findRegion(pawn));
+ this.name = name;
+ this.image = new Image(atlas.findRegion(name));
this.overlays = new StackedImages(atlas);
}
@Override
+ public String toString()
+ {
+ return name;
+ }
+
+ @Override
public void dispose()
{
image.dispose();