added endless mode support to the wave viewer
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
class_name GameEndScreen extends PanelContainer
|
||||
|
||||
signal pressed_continue()
|
||||
|
||||
@export var box: PackedScene
|
||||
|
||||
@export var outcome_label: Label
|
||||
@@ -12,6 +14,11 @@ class_name GameEndScreen extends PanelContainer
|
||||
var game_manager: GameManager
|
||||
|
||||
|
||||
func won_game() -> void:
|
||||
$VBoxContainer/Buttons/ContinueButton.visible = true
|
||||
$VBoxContainer/Buttons/PlayButton.visible = false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
winrate_label.text = str(Data.save_data.winrate) + "%"
|
||||
total_games_label.text = str(Data.save_data.wins + Data.save_data.losses)
|
||||
@@ -49,3 +56,8 @@ func _on_play_button_pressed() -> void:
|
||||
|
||||
func _on_button_mouse_entered() -> void:
|
||||
$AudioStreamPlayer.play()
|
||||
|
||||
|
||||
func _on_continue_button_pressed() -> void:
|
||||
pressed_continue.emit()
|
||||
queue_free()
|
||||
|
||||
@@ -123,6 +123,11 @@ size_flags_vertical = 3
|
||||
layout_mode = 2
|
||||
alignment = 2
|
||||
|
||||
[node name="ContinueButton" type="Button" parent="VBoxContainer/Buttons" unique_id=1143038936]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "BUTTON_CONTINUE"
|
||||
|
||||
[node name="PlayButton" type="Button" parent="VBoxContainer/Buttons" unique_id=774071211]
|
||||
layout_mode = 2
|
||||
text = "BUTTON_RESTART"
|
||||
@@ -135,6 +140,8 @@ text = "BUTTON_MAIN_MENU"
|
||||
stream = SubResource("AudioStreamRandomizer_dram5")
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="mouse_entered" from="VBoxContainer/Buttons/ContinueButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="VBoxContainer/Buttons/ContinueButton" to="." method="_on_continue_button_pressed"]
|
||||
[connection signal="mouse_entered" from="VBoxContainer/Buttons/PlayButton" to="." method="_on_button_mouse_entered"]
|
||||
[connection signal="pressed" from="VBoxContainer/Buttons/PlayButton" to="." method="_on_play_button_pressed"]
|
||||
[connection signal="mouse_entered" from="VBoxContainer/Buttons/QuitButton" to="." method="_on_button_mouse_entered"]
|
||||
|
||||
Reference in New Issue
Block a user