v0.6.3: fixed crash bugs caused by tile discovery
This commit is contained in:
parent
a4e9e10f6d
commit
4d6fdad4ea
|
@ -786,6 +786,7 @@ public class GameScene extends PixelScene {
|
|||
}
|
||||
}
|
||||
|
||||
//todo this doesn't account for walls right now
|
||||
public static void discoverTile( int pos, int oldValue ) {
|
||||
if (scene != null) {
|
||||
scene.tiles.discover( pos, oldValue );
|
||||
|
|
|
@ -113,6 +113,9 @@ public abstract class DungeonTilemap extends Tilemap {
|
|||
|
||||
public void discover( int pos, int oldValue ) {
|
||||
|
||||
int visual = getTileVisual( pos, oldValue, false);
|
||||
if (visual < 0) return;
|
||||
|
||||
final Image tile = new Image( texture );
|
||||
tile.frame( tileset.get( getTileVisual( pos, oldValue, false)));
|
||||
tile.point( tileToWorld( pos ) );
|
||||
|
|
Loading…
Reference in New Issue
Block a user