From d52234d63c32ae40c9befbe3a0d7e843c7a6964e Mon Sep 17 00:00:00 2001 From: Chance Atkinson Date: Sun, 14 Nov 2021 00:43:32 -0600 Subject: [PATCH] Added my win button back :) wooooooo win butttoooonnnn --- godot_ship/scenes/Game/Game.tscn | 8 ++++++++ godot_ship/scenes/Game/Victory.tscn | 5 +++-- godot_ship/script/game/Victory.gd | 15 ++++++--------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/godot_ship/scenes/Game/Game.tscn b/godot_ship/scenes/Game/Game.tscn index 681939f..5d4c5c9 100644 --- a/godot_ship/scenes/Game/Game.tscn +++ b/godot_ship/scenes/Game/Game.tscn @@ -46,5 +46,13 @@ __meta__ = { "_editor_description_": "" } +[node name="Button" type="Button" parent="."] +margin_left = 599.361 +margin_top = 2.97302 +margin_right = 636.361 +margin_bottom = 22.973 +text = "Win" + [connection signal="pressed" from="Buttons/Forfeit" to="." method="_on_Forfeit_pressed"] [connection signal="confirmed" from="ConfirmationDialog" to="." method="_on_ConfirmationDialog_confirmed"] +[connection signal="button_down" from="Button" to="." method="_on_Button_button_down"] diff --git a/godot_ship/scenes/Game/Victory.tscn b/godot_ship/scenes/Game/Victory.tscn index 3d1091c..4397295 100644 --- a/godot_ship/scenes/Game/Victory.tscn +++ b/godot_ship/scenes/Game/Victory.tscn @@ -29,7 +29,7 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="Button" type="Button" parent="."] +[node name="exit_to_main" type="Button" parent="."] margin_left = 541.0 margin_top = 327.85 margin_right = 636.0 @@ -47,5 +47,6 @@ margin_right = 63.2202 margin_bottom = 357.41 text = "Restart" -[connection signal="pressed" from="Button" to="." method="_on_Button_pressed"] +[connection signal="button_down" from="exit_to_main" to="." method="_on_exit_to_main_button_down"] +[connection signal="pressed" from="exit_to_main" to="." method="_on_Button_pressed"] [connection signal="button_down" from="Button2" to="." method="_on_restart_button_down"] diff --git a/godot_ship/script/game/Victory.gd b/godot_ship/script/game/Victory.gd index 1e715f5..5d95329 100644 --- a/godot_ship/script/game/Victory.gd +++ b/godot_ship/script/game/Victory.gd @@ -15,16 +15,13 @@ func _ready(): #func _process(delta): # pass - -# returns player(s) back to main menu -func _on_Button_pressed(): - AudioBus.emit_signal("button_clicked") - #MessageBus.emit_signal("change_scene", "Title") - emit_signal("exit_main") - - func _on_restart_button_down(): AudioBus.emit_signal("button_clicked") #MessageBus.emit_signal("change_scene", "Multiplayer") pass # Replace with function body. - + +# returns player(s) back to main menu +func _on_exit_to_main_button_down(): + AudioBus.emit_signal("button_clicked") + #MessageBus.emit_signal("change_scene", "Title") + emit_signal("exit_main")