2016-03-27 22:27:24 +00:00
|
|
|
package cicaprojekt;
|
|
|
|
|
2016-03-29 08:44:39 +00:00
|
|
|
import java.util.HashMap;
|
|
|
|
|
2016-03-27 22:27:24 +00:00
|
|
|
public class Field extends cicaprojekt.Tile
|
|
|
|
{
|
2016-03-29 09:09:12 +00:00
|
|
|
public static Field testField = new Field();
|
2016-03-29 08:44:39 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2016-03-27 22:27:24 +00:00
|
|
|
@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)");
|
2016-03-27 22:27:24 +00:00
|
|
|
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-27 22:27:24 +00:00
|
|
|
}
|
|
|
|
|
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-27 22:27:24 +00:00
|
|
|
|
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();
|
|
|
|
}
|
2016-03-27 22:27:24 +00:00
|
|
|
|
|
|
|
}
|