feat: add simulation garden demo controls
This commit is contained in:
@@ -32,6 +32,7 @@ var path_pending := false
|
||||
|
||||
var is_dead_visual := false
|
||||
var dead_material := StandardMaterial3D.new()
|
||||
var debug_overlay_visible := true
|
||||
|
||||
|
||||
func debug_log(message: String) -> void:
|
||||
@@ -71,6 +72,7 @@ func _apply_profession_presentation() -> void:
|
||||
profession_prop.mesh = _create_profession_prop_mesh()
|
||||
profession_prop.visible = profession_prop.mesh != null
|
||||
profession_label.text = "%s\n%s" % [npc_name, definition.display_name]
|
||||
profession_label.visible = debug_overlay_visible
|
||||
|
||||
|
||||
func _create_profession_prop_mesh() -> PrimitiveMesh:
|
||||
@@ -112,6 +114,12 @@ func set_carried_food_visible(is_visible: bool) -> void:
|
||||
carried_food_visual.visible = is_visible and not is_dead_visual
|
||||
|
||||
|
||||
func set_debug_overlay_visible(is_visible: bool) -> void:
|
||||
debug_overlay_visible = is_visible
|
||||
if profession_label != null:
|
||||
profession_label.visible = is_visible and not is_dead_visual
|
||||
|
||||
|
||||
func set_target_position(pos: Vector3) -> void:
|
||||
path_request_id += 1
|
||||
var request_id := path_request_id
|
||||
@@ -240,6 +248,7 @@ func apply_dead_visual_state() -> void:
|
||||
is_dead_visual = true
|
||||
carried_food_visual.visible = false
|
||||
profession_prop.visible = false
|
||||
profession_label.visible = false
|
||||
path_request_id += 1
|
||||
velocity = Vector3.ZERO
|
||||
current_path = PackedVector3Array()
|
||||
|
||||
Reference in New Issue
Block a user