feat: Shop continue
This commit is contained in:
parent
9950aa5b41
commit
2ef920bbb8
15
player.gd
15
player.gd
|
|
@ -97,8 +97,13 @@ func _on_continue_button_pressed():
|
||||||
$FinishControl.visible = false
|
$FinishControl.visible = false
|
||||||
$Shop.visible = true
|
$Shop.visible = true
|
||||||
|
|
||||||
#stage_counter += 1
|
|
||||||
#station_reached.emit()
|
|
||||||
#$TimeLimit.start()
|
func _on_shop_shop_exit() -> void:
|
||||||
#$HUD.visible = true
|
is_active = true
|
||||||
#stamina = max_stamina
|
$Shop.visible = false
|
||||||
|
stage_counter += 1
|
||||||
|
station_reached.emit()
|
||||||
|
$TimeLimit.start()
|
||||||
|
$HUD.visible = true
|
||||||
|
stamina = max_stamina
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,7 @@ shape = SubResource("CylinderShape3D_hqtel")
|
||||||
debug_color = Color(0.6328197, 0.113640614, 0, 0.41960785)
|
debug_color = Color(0.6328197, 0.113640614, 0, 0.41960785)
|
||||||
|
|
||||||
[connection signal="timeout" from="TimeLimit" to="." method="_on_time_limit_timeout"]
|
[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="FinishControl/ContinueButton" to="." method="_on_continue_button_pressed"]
|
||||||
[connection signal="pressed" from="FailControl/RetryButton" to="." method="_on_retry_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"]
|
[connection signal="area_entered" from="Hurtbox" to="." method="_on_area_area_entered"]
|
||||||
|
|
|
||||||
6
shop.gd
6
shop.gd
|
|
@ -3,6 +3,8 @@ extends Control
|
||||||
var upgrade_node: Node
|
var upgrade_node: Node
|
||||||
var available_money: int = 1000
|
var available_money: int = 1000
|
||||||
|
|
||||||
|
signal shop_exit
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
$Money.text = str(available_money)
|
$Money.text = str(available_money)
|
||||||
|
|
||||||
|
|
@ -34,3 +36,7 @@ func _on_tux_upgrades_item_clicked(index: int, at_position: Vector2, mouse_butto
|
||||||
populate()
|
populate()
|
||||||
else:
|
else:
|
||||||
$Error.text = "No tens prou Diners!!!!"
|
$Error.text = "No tens prou Diners!!!!"
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_pressed() -> void:
|
||||||
|
shop_exit.emit()
|
||||||
|
|
|
||||||
17
shop.tscn
17
shop.tscn
|
|
@ -121,6 +121,23 @@ offset_bottom = -270.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 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_entered" from="Tux" to="." method="_on_tux_mouse_entered"]
|
||||||
[connection signal="mouse_exited" from="Tux" to="." method="_on_tux_mouse_exited"]
|
[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="item_clicked" from="TuxUpgrades" to="." method="_on_tux_upgrades_item_clicked"]
|
||||||
|
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue