Add shop closes on buying something

This commit is contained in:
JonShard
2026-08-05 09:54:46 +02:00
parent 3646992e35
commit 528f66627b
3 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -19,7 +19,7 @@ func _ready() -> void:
controller.button_pressed.connect(_on_controller_button_pressed)
if other_controller:
other_controller.button_pressed.connect(_on_other_controller_button_pressed)
Signals.station_bought.connect(_on_station_bought)
viewport = get_parent().get_parent() as XRToolsViewport2DIn3D
if not viewport:
push_error("Shop UI could not find XRToolsViewport2DIn3D grand parent")
@@ -76,6 +76,10 @@ func _on_other_controller_button_pressed(button_name: String) -> void:
enabled = false
func _on_station_bought(instance) -> void:
enabled = false
func detect_hand_from_xr_ancestor() -> void:
controller = XRHelpers.get_xr_controller(self)
if not controller: