diff --git a/core/src/sagittarius/model/BaseActor.java b/core/src/sagittarius/model/BaseActor.java index 31fde84..ecaa0ef 100644 --- a/core/src/sagittarius/model/BaseActor.java +++ b/core/src/sagittarius/model/BaseActor.java @@ -10,6 +10,9 @@ public abstract class BaseActor extends Actor { static private BitmapFont fontDebug = new BitmapFont(); + /** + * @return debug String displayed in {@link #draw()} + */ protected abstract String getInfo(); protected float angle; // encapsulate ? @@ -17,7 +20,7 @@ public abstract class BaseActor extends Actor { @Override public void draw(Batch batch, float parentAlpha) { super.draw(batch, parentAlpha); - fontDebug.draw(batch, getInfo(), getX(), getY()); + if (getDebug()) fontDebug.draw(batch, getInfo(), getX(), getY()); } @Override diff --git a/core/src/sagittarius/model/Player.java b/core/src/sagittarius/model/Player.java index c99aa9d..f7174c7 100644 --- a/core/src/sagittarius/model/Player.java +++ b/core/src/sagittarius/model/Player.java @@ -57,13 +57,6 @@ public class Player extends BaseActor { bow.act(dt); } - /** - * @return the Player's home Planet. - */ - Planet getHome() { - return this.home; - } - @Override protected String getInfo() { return @@ -71,4 +64,11 @@ public class Player extends BaseActor { ; } + /** + * @return the Player's home Planet. + */ + Planet getHome() { + return this.home; + } + }