fixed echoes in ONeill class.

This commit is contained in:
Kjistóf 2016-03-28 23:32:09 +02:00
parent da86d11f16
commit 0249d177a7

View File

@ -11,48 +11,78 @@ public class ONeill implements Destroyable{
public void destroy() { public void destroy() {
System.out.println("ONeill.destroy() hivodott."); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.destroy()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.destroy()");
Menu.removeTab();
} }
public cicaprojekt.Tile getCurrentTile() { public cicaprojekt.Tile getCurrentTile() {
System.out.println("ONeill.getCurrentTile() hivodott."); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.getCurrentTile()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.getCurrentTile()");
Menu.removeTab();
return currentTile; return currentTile;
} }
public void setCurrentTile(cicaprojekt.Tile newCurrentTile) { public void setCurrentTile(cicaprojekt.Tile newCurrentTile) {
System.out.println("ONeill.setCurrentTile(Tile) hivodott."); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setCurrentTile()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setCurrentTile()");
Menu.removeTab();
currentTile = newCurrentTile; currentTile = newCurrentTile;
} }
public void move(Direction direction) { public void move(Direction direction) {
System.out.println("ONeill.move(Direction) hivodott."); Menu.addTab();
setCurrentTile(currentTile.getAdjacentTile(direction)); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Oneill.move(" + direction.name() + ")");
this.setFacingDirection(direction);
Tile tile = this.getCurrentTile().getAdjacentTile(direction);
tile.onEntry();
setCurrentTile(tile);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Oneill.move()");
Menu.removeTab();
} }
public void boxLift() { public void boxLift() {
System.out.println("ONeill.boxLift() hivodott."); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxLift()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.boxLift()");
Menu.removeTab();
boxLifted = (Box) currentTile.getAdjacentTile(facingDirection).removeItemFromTile(); boxLifted = (Box) currentTile.getAdjacentTile(facingDirection).removeItemFromTile();
} }
public void boxDrop() { public void boxDrop() {
System.out.println("ONeill.boxDrop() hivodott."); Menu.addTab();
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;
} }
public Direction getFacingDirection() { public Direction getFacingDirection() {
System.out.println("ONeill.getFacingDirection() hivodott."); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.getFacingDirection()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.getFacingDirection()");
Menu.removeTab();
return facingDirection; return facingDirection;
} }
public void setFacingDirection(Direction direction) { public void setFacingDirection(Direction direction) {
System.out.println("ONeill.setFacingDirection() hivodott."); Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setFacingDirection(" + direction.name() + ")");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.setFacingDirection()");
Menu.removeTab();
facingDirection = direction; facingDirection = direction;
} }
public void shootStargate(cicaprojekt.Stargate stargate) { public void shootStargate(Stargate stargate) {
System.out.println("ONeill.shootStargate(Stargate) hivodott."); Menu.addTab();
currentTile.getAdjacentTile(facingDirection).spawnStargate(stargate, facingDirection); System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.shootStargate(stargate)");
this.currentTile.getAdjacentTile(facingDirection).spawnStargate(stargate, facingDirection);
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "ONeill.shootStargate()");
Menu.removeTab();
} }
} }