edit end screen

This commit is contained in:
Spencer Killen 2022-11-27 20:11:34 -07:00
parent c7f48f9fd3
commit 40e16bba92
Signed by: sjkillen
GPG Key ID: F307025B65C860BA
2 changed files with 17 additions and 4 deletions

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/audio/human-impact-on-ground-6982.mp3" type="AudioStream" id=1]
[ext_resource path="res://assets/Background_space.png" type="Texture" id=2]
[ext_resource path="res://assets/audio/RandomSong.wav" type="AudioStream" id=3]
[ext_resource path="res://screens/death.gd" type="Script" id=4]
[ext_resource path="res://assets/ui_theme.tres" type="Theme" id=5]
[ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=6]
[node name="EndScreen" type="Control"]
anchor_right = 1.0
@ -51,6 +52,7 @@ focus_neighbour_bottom = NodePath("../PlayButton")
text = "Quit"
[node name="Blackout" type="CanvasLayer" parent="."]
visible = false
[node name="BlackBox" type="ColorRect" parent="Blackout"]
anchor_right = 1.0
@ -68,6 +70,8 @@ autoplay = true
[node name="TitleScreenMusic" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
[node name="shader" parent="." instance=ExtResource( 6 )]
[connection signal="pressed" from="Menu/RetryButton" to="." method="_on_RetryButton_pressed"]
[connection signal="pressed" from="Menu/MenuButton" to="." method="_on_MenuButton_pressed"]
[connection signal="pressed" from="Menu/QuitButton" to="." method="_on_QuitButton_pressed"]

View File

@ -1,17 +1,26 @@
extends Control
func _ready():
$Blackout.visible = true
$Menu.visible = false
func _on_RetryButton_pressed():
pass # Replace with function body.
func _on_MenuButton_pressed():
var _err = get_tree().change_scene("res://screens/title.tscn")
func _on_QuitButton_pressed():
get_tree().quit()
func _on_BlackoutTimer_timeout():
pass # Replace with function body.
var dialog = Dialogic.start("end")
dialog.connect("tree_exited", self, "_on_dialogue_done")
add_child(dialog)
func _on_dialogue_done():
$Blackout.visible = false
$Menu.visible = true
$TitleScreenMusic.play()
$Menu/RetryButton.grab_focus()