v0.4.2: added the ability for tilemaps to selectively not render certain tiles
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.noosa.Tilemap;
|
||||
@@ -99,4 +100,9 @@ public class DungeonTilemap extends Tilemap {
|
||||
public boolean overlapsScreenPoint( int x, int y ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needsRender(int pos) {
|
||||
return Level.discoverable[pos] && Dungeon.level.map[pos] != Terrain.WATER;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user