This commit is contained in:
Jesper Lundin 2007-04-23 16:25:27 +00:00
parent e1c0fa7a48
commit 7e309db351
9 changed files with 16 additions and 18 deletions

View file

@ -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();
}
}