Add shop closes on buying something
This commit is contained in:
+5
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user