Sound effects

This commit is contained in:
Felipe M 2021-05-23 00:38:30 +02:00
parent 6ea21b3181
commit 6671b455c4
Signed by: fmartingr
GPG key ID: 716BC147715E716F
17 changed files with 94 additions and 6 deletions

View file

@ -6,11 +6,16 @@ func set_paused(value):
paused = value
get_tree().paused = paused
visible = paused
if value:
SoundFx.play_fx("Pause")
else:
SoundFx.play_fx("Unpause", 1, -30)
func _on_ResumeButton_pressed():
self.paused = false
func _on_QuitButton_pressed():
SoundFx.play_fx("Click")
get_tree().quit()
func _process(_delta):

View file

@ -53,5 +53,6 @@ margin_right = 64.0
margin_bottom = 71.0
rect_min_size = Vector2( 64, 16 )
text = "Quit"
[connection signal="pressed" from="CenterContainer/VBoxContainer/ResumeButton" to="." method="_on_ResumeButton_pressed"]
[connection signal="pressed" from="CenterContainer/VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"]