diff --git a/cicaprojekt/Gate.java b/cicaprojekt/Gate.java index dca2109..a3cfaf6 100644 --- a/cicaprojekt/Gate.java +++ b/cicaprojekt/Gate.java @@ -5,22 +5,40 @@ public class Gate extends cicaprojekt.Tile private boolean open = false; public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) { - if(this.open) - adjacentTile.get(direction).spawnStargate(stargate, direction); - return; + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate(" + stargate + direction + ")"); + if(this.open) adjacentTile.get(direction).spawnStargate(stargate, direction); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.spawnStargate()"); + Menu.removeTab(); } public void onEntry() { + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onEntry()"); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onEntry()"); + Menu.removeTab(); } public void onExit() { + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onExit()"); + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.onExit()"); + Menu.removeTab(); } public boolean isOpen() { - return open; + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.isOpen()"); + return open; + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.isOpen()"); + Menu.removeTab(); } public void setOpen(boolean gateState) { - this.open = gateState; + Menu.addTab(); + System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen(" + gateState + ")"); + this.open = gateState; + System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Gate.setOpen()"); + Menu.removeTab(); } }