Wall - finished

This commit is contained in:
ericnerdo 2016-04-24 22:37:27 +02:00
parent 1c8566d96c
commit 69a2384160

View File

@ -3,6 +3,9 @@ package cicaprojekt;
public class Wall extends Tile {
private Stargate sg;
public Wall(){
super();
}
public void spawnStargate(Stargate stargate, Direction direction) {
if(sg == null)
@ -15,16 +18,16 @@ public class Wall extends Tile {
sg = null;
}
public void onEntry() {
public void onEntry(PlayerBase playerBase) {
if(sg == null) {
return;
}
else {
sg.teleport(playerBase.facingDirection);
}
}
public void onExit() {
public void onExit(PlayerBase playerBase) throws IllegalStateException {
throw new IllegalStateException("Hiba! Te hogy kerültél a falba?");
}
}