You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
713 B
57 lines
713 B
package mightypork.rogue.world.tile.models;
|
|
|
|
|
|
import mightypork.rogue.world.tile.Tile;
|
|
import mightypork.rogue.world.tile.TileModel;
|
|
import mightypork.rogue.world.tile.TileRenderContext;
|
|
|
|
|
|
public class NullTile extends TileModel {
|
|
|
|
private Tile inst;
|
|
|
|
|
|
public NullTile(int id)
|
|
{
|
|
super(id);
|
|
}
|
|
|
|
|
|
@Override
|
|
public void render(Tile tile, TileRenderContext context)
|
|
{
|
|
}
|
|
|
|
|
|
@Override
|
|
public boolean isWalkable(Tile tile)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
@Override
|
|
public boolean isPotentiallyWalkable()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
@Override
|
|
public boolean isNullTile()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
@Override
|
|
public Tile create()
|
|
{
|
|
if (inst == null) {
|
|
inst = new Tile(this);
|
|
}
|
|
|
|
return inst;
|
|
}
|
|
|
|
}
|
|
|