cicaprojekt/cicaprojekt/Field.java

43 lines
1.6 KiB
Java
Raw Normal View History

package cicaprojekt;
import java.util.HashMap;
public class Field extends cicaprojekt.Tile
{
public static Field testField = new Field();
public Field() {
setItemOnTile(new Box());
adjacentTile = new HashMap<Direction, Tile>();
adjacentTile.put(Direction.NORTH, Field.testField);
adjacentTile.put(Direction.EAST, Field.testField);
adjacentTile.put(Direction.SOUTH, Field.testField);
adjacentTile.put(Direction.WEST, Field.testField);
}
@Override
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
2016-03-29 00:00:53 +00:00
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.spawnStargate(Stargate stargate, Direction direction)");
adjacentTile.get(direction).spawnStargate(stargate, direction);
2016-03-29 00:00:53 +00:00
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.spawnStargate(Stargate stargate, Direction direction)");
Menu.removeTab();
}
2016-03-29 00:00:53 +00:00
public void onEntry() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onEntry()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onEntry()");
Menu.removeTab();
}
2016-03-29 00:00:53 +00:00
public void onExit() {
Menu.addTab();
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onExit()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Field.onExit()");
Menu.removeTab();
}
}