Refactored spawnStargate, with default implementation in base class
This commit is contained in:
@ -1,18 +1,19 @@
|
||||
package cicaprojekt;
|
||||
|
||||
public class Wall extends Tile {
|
||||
private Stargate sg;
|
||||
private Stargate sg = null;
|
||||
|
||||
public Wall() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnStargate(Stargate stargate, Direction direction) {
|
||||
clearStargate();
|
||||
if (sg == null) {
|
||||
sg = stargate;
|
||||
sg.setCurrentWall(this);
|
||||
|
||||
Game.instance.updateDisplay();
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
Reference in New Issue
Block a user