added method Tile.isSteppable() for obvious reasons...
This commit is contained in:
@ -32,12 +32,15 @@ public class PlayerBase implements Destroyable {
|
||||
|
||||
public void move(Direction direction) {
|
||||
this.setFacingDirection(direction);
|
||||
Tile tile = this.getCurrentTile().getAdjacentTile(direction);
|
||||
Tile adjtile = this.getCurrentTile().getAdjacentTile(direction);
|
||||
|
||||
if (tile != null)
|
||||
if (adjtile != null)
|
||||
{
|
||||
tile.onEntry(this);
|
||||
setCurrentTile(tile);
|
||||
if (adjtile.isSteppable())
|
||||
{
|
||||
adjtile.onEntry(this);
|
||||
setCurrentTile(adjtile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user