cicaprojekt/cicaprojekt/Field.java
2016-04-24 23:01:34 +02:00

34 lines
803 B
Java

package cicaprojekt;
import java.util.HashMap;
import java.util.Map;
public class Field extends cicaprojekt.Tile {
private static int recursionLimit = 0;
public Field() {
super();
}
@Override
public void spawnStargate(cicaprojekt.Stargate stargate, Direction direction) {
if (recursionLimit++ >= 10)
this.adjacentTile.put(direction, new Wall());
adjacentTile.get(direction).spawnStargate(stargate, direction);
}
public void onEntry(PlayerBase playerBase) {
if (boxStack.size() > 0)
return;
playerBase.setCurrentTile(this);
if (zpmOnTile != null)
playerBase.pickZPM(this);
}
public void onExit(PlayerBase playerBase) {
return;
}
}