summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/engine/HeadedPawn.java7
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java6
2 files changed, 4 insertions, 9 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/HeadedPawn.java b/core/src/ch/asynk/tankontank/engine/HeadedPawn.java
index ca08e26..a42f699 100644
--- a/core/src/ch/asynk/tankontank/engine/HeadedPawn.java
+++ b/core/src/ch/asynk/tankontank/engine/HeadedPawn.java
@@ -19,12 +19,7 @@ public abstract class HeadedPawn extends Pawn
super(atlas, pawn);
this.head = new Image(atlas.findRegion(head));
this.orientation = Orientation.KEEP;
- }
-
- @Override
- public String toString()
- {
- return super.toString() + " " + orientation;
+ this.descr += " " + orientation;
}
@Override
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index d646915..197fde4 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -34,7 +34,7 @@ public abstract class Pawn implements Moveable, Disposable
private Vector3 position = new Vector3(0f, 0f, 0f);
private Vector3 prevPosition = new Vector3(0f, 0f, 0f);
- private String name;
+ protected String descr;
private Image image;
private StackedImages overlays;
public Attack attack = new Attack();
@@ -69,7 +69,7 @@ public abstract class Pawn implements Moveable, Disposable
public Pawn(TextureAtlas atlas, String name)
{
- this.name = name;
+ this.descr = descr;
this.image = new Image(atlas.findRegion(name));
this.overlays = new StackedImages(atlas);
}
@@ -77,7 +77,7 @@ public abstract class Pawn implements Moveable, Disposable
@Override
public String toString()
{
- return name;
+ return descr;
}
@Override