fixed the order of echoes is several classes

This commit is contained in:
Kjistóf 2016-03-29 00:16:00 +02:00
parent 02df90bb59
commit 55cba088f9
3 changed files with 11 additions and 13 deletions

View File

@ -7,13 +7,11 @@ public class Gate extends cicaprojekt.Tile
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) { public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate(stargate," + direction.name() + ")"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate(stargate," + direction.name() + ")");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate()");
if(this.open) if(this.open)
{
adjacentTile.get(direction).spawnStargate(stargate, direction); adjacentTile.get(direction).spawnStargate(stargate, direction);
Menu.removeTab(); System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate()");
} Menu.removeTab();
else return; return;
} }
public void onEntry() { public void onEntry() {
@ -41,9 +39,9 @@ public class Gate extends cicaprojekt.Tile
public void setOpen(boolean gateState) { public void setOpen(boolean gateState) {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen(" + gateState + ")"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen(" + gateState + ")");
this.open = gateState;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen()"); System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen()");
Menu.removeTab(); Menu.removeTab();
this.open = gateState;
} }
} }

View File

@ -28,9 +28,9 @@ public class ONeill implements Destroyable{
public void setCurrentTile(cicaprojekt.Tile newCurrentTile) { public void setCurrentTile(cicaprojekt.Tile newCurrentTile) {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setCurrentTile()"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setCurrentTile()");
currentTile = newCurrentTile;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setCurrentTile()"); System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setCurrentTile()");
Menu.removeTab(); Menu.removeTab();
currentTile = newCurrentTile;
} }
public void move(Direction direction) { public void move(Direction direction) {
@ -56,10 +56,10 @@ public class ONeill implements Destroyable{
public void boxDrop() { public void boxDrop() {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxDrop()"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxDrop()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxDrop()");
Menu.removeTab();
currentTile.getAdjacentTile(facingDirection).setItemOnTile(boxLifted); currentTile.getAdjacentTile(facingDirection).setItemOnTile(boxLifted);
boxLifted = null; boxLifted = null;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxDrop()");
Menu.removeTab();
} }
public Direction getFacingDirection() { public Direction getFacingDirection() {
@ -73,9 +73,9 @@ public class ONeill implements Destroyable{
public void setFacingDirection(Direction direction) { public void setFacingDirection(Direction direction) {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setFacingDirection(" + direction.name() + ")"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setFacingDirection(" + direction.name() + ")");
facingDirection = direction;
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setFacingDirection()"); System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setFacingDirection()");
Menu.removeTab(); Menu.removeTab();
facingDirection = direction;
} }
public void shootStargate(Stargate stargate) { public void shootStargate(Stargate stargate) {

View File

@ -6,24 +6,24 @@ public class Scale extends Field {
public void onEntry() { public void onEntry() {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onEntry()"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onEntry()");
gateConnected.setOpen(true);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onEntry()"); System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onEntry()");
Menu.removeTab(); Menu.removeTab();
gateConnected.setOpen(true);
} }
public void onExit() { public void onExit() {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onExit()"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onExit()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onExit()");
gateConnected.setOpen(false); gateConnected.setOpen(false);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.onExit()");
Menu.removeTab(); Menu.removeTab();
} }
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) { public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
Menu.addTab(); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.spawnStarGate(stargate," + direction.name() + ")"); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.spawnStarGate(stargate," + direction.name() + ")");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.spawnStarGate()");
adjacentTile.get(direction).spawnStargate(stargate, direction); adjacentTile.get(direction).spawnStargate(stargate, direction);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Scale.spawnStarGate()");
Menu.removeTab(); Menu.removeTab();
} }
} }