Rogue: Savage Rats, a retro-themed dungeon crawler
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.
 
 
rogue-savage-rats/src/mightypork/rogue/world/tile/TileModel.java

45 lines
808 B

package mightypork.rogue.world.tile;
import mightypork.rogue.world.EntityModel;
import mightypork.util.annotations.DefaultImpl;
public abstract class TileModel extends EntityModel<TileData, TileRenderContext> {
public TileModel(int id) {
super(id);
Tiles.register(id, this);
}
/**
* Test if this tile type is potentially walkable. Used during world
* generation.
*
* @return can be walked through (if discovered / open)
*/
public abstract boolean isPotentiallyWalkable();
/**
* Try to reveal a secret.
*
* @param data tile data
*/
@DefaultImpl
public void search(TileData data)
{
// do nothing.
}
/**
* Check if a mob can walk through.
*
* @param data tile data
* @return is walkable
*/
public abstract boolean isWalkable(TileData data);
}