Implemented Stargate spawning correctly

Or at least attemted to
This commit is contained in:
Bokros Bálint
2016-04-26 01:08:37 +02:00
parent 90a2b58c37
commit f6bef6fdde
2 changed files with 15 additions and 2 deletions

View File

@ -8,14 +8,21 @@ public class Wall extends Tile {
}
public void spawnStargate(Stargate stargate, Direction direction) {
if (sg == null)
clearStargate();
if (sg == null) {
sg = stargate;
sg.setCurrentWall(this);
}
else
return;
}
public void clearStargate() {
sg = null;
if(sg != null) {
sg.setCurrentWall(null);
sg = null;
}
}
public void onEntry(PlayerBase playerBase) {