PAusej whohowhohoho

This commit is contained in:
Haze Weathers 2023-12-30 23:15:18 -05:00
parent 5772e5f046
commit 75cd885a58
2 changed files with 34 additions and 54 deletions

View file

@ -49,11 +49,10 @@ func _on_Resume_pressed():
func _on_Restart_pressed(): func _on_Restart_pressed():
Audio.ac_music.set_stream_paused(false) Fade.fade_out(0.4)
Audio.ac_pause_music.stop() yield(Fade, "fade_finished")
Game.call_deferred("restart_level") unpause()
get_tree().paused = false SceneManager.current_scene = load("res://menus/marathon_start.tscn").instance()
queue_free()
func _on_Settings_pressed(): func _on_Settings_pressed():
@ -63,12 +62,9 @@ func _on_Settings_pressed():
func _on_ExitLevel_pressed(): func _on_ExitLevel_pressed():
Audio.ac_music.set_stream_paused(false) Fade.fade_out(0.4)
Audio.ac_pause_music.stop()
get_tree().paused = false
Game.change_map(load("res://menus/level_select_scholar.tscn"))
yield(Fade, "fade_finished") yield(Fade, "fade_finished")
queue_free() get_tree().quit()
func _on_OptionsScreen_exit(): func _on_OptionsScreen_exit():

View file

@ -14,48 +14,50 @@
pause_mode = 2 pause_mode = 2
layer = 110 layer = 110
script = ExtResource( 4 ) script = ExtResource( 4 )
__meta__ = {
[node name="Border" type="NinePatchRect" parent="."] "_edit_horizontal_guides_": [ 84.0 ]
margin_left = 64.0 }
margin_top = 25.0
margin_right = 192.0
margin_bottom = 82.0
texture = ExtResource( 8 )
patch_margin_left = 3
patch_margin_top = 3
patch_margin_right = 3
patch_margin_bottom = 3
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
pause_mode = 2 pause_mode = 2
margin_left = 67.0 margin_left = 67.0
margin_top = 28.0 margin_top = 34.0
margin_right = 189.0 margin_right = 189.0
margin_bottom = 79.0 margin_bottom = 72.0
color = Color( 0.239216, 0.239216, 0.443137, 1 ) color = Color( 0.239216, 0.239216, 0.443137, 1 )
[node name="Paused" type="Label" parent="."] [node name="Paused" type="Label" parent="."]
pause_mode = 2 pause_mode = 2
material = ExtResource( 6 ) material = ExtResource( 6 )
margin_left = 64.0 margin_left = 64.0
margin_top = 14.0 margin_top = 20.0
margin_right = 192.0 margin_right = 192.0
margin_bottom = 24.0 margin_bottom = 30.0
theme = ExtResource( 5 ) theme = ExtResource( 5 )
text = "PAUSED!" text = "PAUSED!"
align = 1 align = 1
[node name="Border" type="NinePatchRect" parent="."]
margin_left = 64.0
margin_top = 31.0
margin_right = 192.0
margin_bottom = 75.0
texture = ExtResource( 8 )
patch_margin_left = 3
patch_margin_top = 3
patch_margin_right = 3
patch_margin_bottom = 3
[node name="Body" type="Label" parent="."] [node name="Body" type="Label" parent="."]
pause_mode = 2 pause_mode = 2
margin_left = 64.0 margin_left = 64.0
margin_top = 29.0 margin_top = 35.0
margin_right = 192.0 margin_right = 192.0
margin_bottom = 78.0 margin_bottom = 75.0
theme = ExtResource( 2 ) theme = ExtResource( 2 )
text = "RESUME text = "RESUME
RESTART RESTART GAME
OPTIONS EXIT GAME"
EXit level"
align = 1 align = 1
[node name="Resume" type="TextureButton" parent="Body"] [node name="Resume" type="TextureButton" parent="Body"]
@ -73,38 +75,23 @@ texture_focused = ExtResource( 3 )
[node name="Restart" type="TextureButton" parent="Body"] [node name="Restart" type="TextureButton" parent="Body"]
pause_mode = 2 pause_mode = 2
material = ExtResource( 1 ) material = ExtResource( 1 )
margin_left = 32.0 margin_left = 15.0
margin_top = 14.0 margin_top = 14.0
margin_right = 40.0 margin_right = 23.0
margin_bottom = 22.0 margin_bottom = 22.0
focus_neighbour_left = NodePath(".") focus_neighbour_left = NodePath(".")
focus_neighbour_top = NodePath("../Resume") focus_neighbour_top = NodePath("../Resume")
focus_neighbour_right = NodePath(".") focus_neighbour_right = NodePath(".")
focus_neighbour_bottom = NodePath("../Settings")
texture_focused = ExtResource( 3 )
[node name="Settings" type="TextureButton" parent="Body"]
pause_mode = 2
material = ExtResource( 1 )
margin_left = 32.0
margin_top = 27.0
margin_right = 40.0
margin_bottom = 35.0
focus_neighbour_left = NodePath(".")
focus_neighbour_top = NodePath("../Restart")
focus_neighbour_right = NodePath(".")
focus_neighbour_bottom = NodePath("../ExitLevel")
texture_focused = ExtResource( 3 ) texture_focused = ExtResource( 3 )
[node name="ExitLevel" type="TextureButton" parent="Body"] [node name="ExitLevel" type="TextureButton" parent="Body"]
pause_mode = 2 pause_mode = 2
material = ExtResource( 1 ) material = ExtResource( 1 )
margin_left = 22.0 margin_left = 25.0
margin_top = 40.0 margin_top = 27.0
margin_right = 30.0 margin_right = 33.0
margin_bottom = 48.0 margin_bottom = 35.0
focus_neighbour_left = NodePath(".") focus_neighbour_left = NodePath(".")
focus_neighbour_top = NodePath("../Settings")
focus_neighbour_right = NodePath(".") focus_neighbour_right = NodePath(".")
texture_focused = ExtResource( 3 ) texture_focused = ExtResource( 3 )
@ -127,9 +114,6 @@ visible = false
[connection signal="focus_entered" from="Body/Restart" to="MenuSounds" method="play_select_sound"] [connection signal="focus_entered" from="Body/Restart" to="MenuSounds" method="play_select_sound"]
[connection signal="pressed" from="Body/Restart" to="." method="_on_Restart_pressed"] [connection signal="pressed" from="Body/Restart" to="." method="_on_Restart_pressed"]
[connection signal="pressed" from="Body/Restart" to="MenuSounds" method="play_confirm_sound"] [connection signal="pressed" from="Body/Restart" to="MenuSounds" method="play_confirm_sound"]
[connection signal="focus_entered" from="Body/Settings" to="MenuSounds" method="play_select_sound"]
[connection signal="pressed" from="Body/Settings" to="." method="_on_Settings_pressed"]
[connection signal="pressed" from="Body/Settings" to="MenuSounds" method="play_confirm_sound"]
[connection signal="focus_entered" from="Body/ExitLevel" to="MenuSounds" method="play_select_sound"] [connection signal="focus_entered" from="Body/ExitLevel" to="MenuSounds" method="play_select_sound"]
[connection signal="pressed" from="Body/ExitLevel" to="." method="_on_ExitLevel_pressed"] [connection signal="pressed" from="Body/ExitLevel" to="." method="_on_ExitLevel_pressed"]
[connection signal="pressed" from="Body/ExitLevel" to="MenuSounds" method="play_confirm_sound"] [connection signal="pressed" from="Body/ExitLevel" to="MenuSounds" method="play_confirm_sound"]