Implemented initial player death
This commit is contained in:
@ -31,16 +31,16 @@ public class PlayerBase implements Destroyable {
|
||||
}
|
||||
|
||||
public void move(Direction direction) {
|
||||
this.setFacingDirection(direction);
|
||||
Tile adjtile = this.getCurrentTile().getAdjacentTile(direction);
|
||||
if(!isDestroyed()) {
|
||||
this.setFacingDirection(direction);
|
||||
Tile adjtile = this.getCurrentTile().getAdjacentTile(direction);
|
||||
|
||||
if (adjtile != null)
|
||||
{
|
||||
if (adjtile.isSteppable())
|
||||
{
|
||||
currentTile.onExit(this);
|
||||
setCurrentTile(adjtile);
|
||||
adjtile.onEntry(this);
|
||||
if (adjtile != null) {
|
||||
if (adjtile.isSteppable()) {
|
||||
currentTile.onExit(this);
|
||||
setCurrentTile(adjtile);
|
||||
adjtile.onEntry(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user