34 lines
803 B
Java
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;
|
|
}
|
|
}
|