This commit is contained in:
parent
e1c0fa7a48
commit
7e309db351
9 changed files with 16 additions and 18 deletions
|
|
@ -84,13 +84,13 @@ public abstract class Building extends GameEntity{
|
|||
|
||||
|
||||
/**
|
||||
* Removes this unit from the game.
|
||||
* Removes this building from the game.
|
||||
*
|
||||
*/
|
||||
public void removeUnit(){
|
||||
public void removeBuilding(){
|
||||
unitNode.remove(getSprite());
|
||||
getPlayer().removeUnit(this);
|
||||
InGameState.getMap().removePos(oldPos.getX(), oldPos.getY());
|
||||
InGameState.getMap().removeBuildPos(oldPos.getX(), oldPos.getY(), this.size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -99,7 +99,7 @@ public abstract class Building extends GameEntity{
|
|||
public void update() {
|
||||
|
||||
if(getLife()<=0) {
|
||||
removeUnit();
|
||||
removeBuilding();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue