limit empty tile visible distance

This commit is contained in:
leca 2024-06-07 04:52:30 +03:00
parent 2092e3b0fa
commit ea387c1bbb
1 changed files with 4 additions and 0 deletions

View File

@ -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)