Wall - finished
This commit is contained in:
parent
1c8566d96c
commit
69a2384160
@ -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?");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user