feat: Shop continue

This commit is contained in:
Dusk 2026-03-05 20:05:16 +01:00
parent 9950aa5b41
commit 2ef920bbb8
4 changed files with 35 additions and 6 deletions

View File

@ -96,9 +96,14 @@ func _on_retry_button_pressed():
func _on_continue_button_pressed():
$FinishControl.visible = false
$Shop.visible = true
#stage_counter += 1
#station_reached.emit()
#$TimeLimit.start()
#$HUD.visible = true
#stamina = max_stamina
func _on_shop_shop_exit() -> void:
is_active = true
$Shop.visible = false
stage_counter += 1
station_reached.emit()
$TimeLimit.start()
$HUD.visible = true
stamina = max_stamina

View File

@ -289,6 +289,7 @@ shape = SubResource("CylinderShape3D_hqtel")
debug_color = Color(0.6328197, 0.113640614, 0, 0.41960785)
[connection signal="timeout" from="TimeLimit" to="." method="_on_time_limit_timeout"]
[connection signal="shop_exit" from="Shop" to="." method="_on_shop_shop_exit"]
[connection signal="pressed" from="FinishControl/ContinueButton" to="." method="_on_continue_button_pressed"]
[connection signal="pressed" from="FailControl/RetryButton" to="." method="_on_retry_button_pressed"]
[connection signal="area_entered" from="Hurtbox" to="." method="_on_area_area_entered"]

View File

@ -3,6 +3,8 @@ extends Control
var upgrade_node: Node
var available_money: int = 1000
signal shop_exit
func _process(delta: float) -> void:
$Money.text = str(available_money)
@ -34,3 +36,7 @@ func _on_tux_upgrades_item_clicked(index: int, at_position: Vector2, mouse_butto
populate()
else:
$Error.text = "No tens prou Diners!!!!"
func _on_button_pressed() -> void:
shop_exit.emit()

View File

@ -121,6 +121,23 @@ offset_bottom = -270.0
grow_horizontal = 2
grow_vertical = 2
[node name="Button" type="Button" parent="." unique_id=1169928484]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 387.0
offset_top = 249.0
offset_right = 550.0
offset_bottom = 302.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 32
text = "Continuar"
[connection signal="mouse_entered" from="Tux" to="." method="_on_tux_mouse_entered"]
[connection signal="mouse_exited" from="Tux" to="." method="_on_tux_mouse_exited"]
[connection signal="item_clicked" from="TuxUpgrades" to="." method="_on_tux_upgrades_item_clicked"]
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]