limit empty tile visible distance
This commit is contained in:
parent
2092e3b0fa
commit
ea387c1bbb
|
@ -22,6 +22,7 @@ var tile_materials = [ # must be in the same order as an enum above!
|
||||||
}
|
}
|
||||||
@export var tile_type: TileType = TileType.Empty
|
@export var tile_type: TileType = TileType.Empty
|
||||||
@onready var visible_mesh = $VisibleMesh
|
@onready var visible_mesh = $VisibleMesh
|
||||||
|
@onready var God = get_tree().root.get_node("world/God")
|
||||||
|
|
||||||
var maximum_decoration_objects = 0
|
var maximum_decoration_objects = 0
|
||||||
|
|
||||||
|
@ -91,3 +92,6 @@ func save():
|
||||||
"pos_z": position.z,
|
"pos_z": position.z,
|
||||||
"tile_type": tile_type
|
"tile_type": tile_type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if (tile_type == TileType.Empty): visible = (position.distance_to(God.position) < 100)
|
||||||
|
|
Loading…
Reference in New Issue