Refactored spawnStargate, with default implementation in base class

This commit is contained in:
Bokros Bálint
2016-05-13 18:14:14 +02:00
committed by Kjistóf
parent 78b7645bfe
commit 314428b273
6 changed files with 7 additions and 22 deletions

View File

@ -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;