public String toString() {
return toString(false);
}
public String toString(final boolean shortDesc) {
AnimationHandler currentAnimation = getCurrentAnimation();
if (currentAnimation instanceof AnimationGLHandler) {
String s = "*" + (currentAnimation.getPlayerStatus() == Animation.PLAYING ? ">" : "-") + "* Fighter " + (attrs.containsKey("player") ? attrs.get("player") : "");
s += ((getFIGHTERMACHINESTATE() & FIGHTERMACHINE_A) != 0 ? " is attacking" : (getFIGHTERMACHINESTATE() & FIGHTERMACHINE_D) != 0 ? " is defending" : (getFIGHTERMACHINESTATE() & FIGHTERMACHINE_NA) != 0 ? " takes no action" : " is not machine");
try {
if (!shortDesc) {
s += "\n || facing : " + (hasOpponentsAtLeft() ? "left" : "") + (hasOpponentsAtRight() ? "right" : "");
s += "\n || on screen res. factor = " + SpritesChar.RES_FACTORS_map.get(player.gui.getModelResolution());
s += "\n || on scene position = "
+ "\n || " + pos;
s += "\n || current move : " + getCurrentAnimName();
s += "\n || current frame : " + (currentAnimation instanceof AnimationHandler ? currentAnimation.getPosition() : "n/a");
Map<Integer, Map<String, Object>> coll = calcCollision();
Map<String, Object> r = new HashMap<String, Object>();
s += "\n || colliding box : ";
if (coll.containsKey(FIGHTERMACHINE_A)) {
r = coll.get(FIGHTERMACHINE_A);