diff --git a/scripts/Tile.gd b/scripts/Tile.gd index 3a04a7a..6d4eb68 100644 --- a/scripts/Tile.gd +++ b/scripts/Tile.gd @@ -22,6 +22,7 @@ var tile_materials = [ # must be in the same order as an enum above! } @export var tile_type: TileType = TileType.Empty @onready var visible_mesh = $VisibleMesh +@onready var God = get_tree().root.get_node("world/God") var maximum_decoration_objects = 0 @@ -91,3 +92,6 @@ func save(): "pos_z": position.z, "tile_type": tile_type } + +func _process(delta): + if (tile_type == TileType.Empty): visible = (position.distance_to(God.position) < 100)