aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/audio/play_random.gd4
-rw-r--r--client/audio/play_random.tscn2
-rw-r--r--client/game.tscn1
-rw-r--r--client/menu/sounds/failure.oggbin14740 -> 8296 bytes
-rw-r--r--client/player/effect.gd17
5 files changed, 17 insertions, 7 deletions
diff --git a/client/audio/play_random.gd b/client/audio/play_random.gd
index d702756d..efaad7d8 100644
--- a/client/audio/play_random.gd
+++ b/client/audio/play_random.gd
@@ -52,6 +52,10 @@ func play_random():
s.pitch_scale = randf_range(0.9, 1.1)
s.play()
+func stop_all():
+ for s in sounds:
+ s.stop()
+
func start_autoplay():
autoplay = true
play_random()
diff --git a/client/audio/play_random.tscn b/client/audio/play_random.tscn
index f9b20842..44f3a10b 100644
--- a/client/audio/play_random.tscn
+++ b/client/audio/play_random.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=2 format=3 uid="uid://bncx0wul2ikrg"]
+[gd_scene load_steps=2 format=3 uid="uid://bbyb6s110my8c"]
[ext_resource type="Script" path="res://audio/play_random.gd" id="1_c8pxf"]
diff --git a/client/game.tscn b/client/game.tscn
index b44974b2..d71ae4be 100644
--- a/client/game.tscn
+++ b/client/game.tscn
@@ -29,6 +29,7 @@ script = ExtResource("6_fbxu8")
[node name="FollowCamera" parent="." node_paths=PackedStringArray("target") instance=ExtResource("2_s8y6o")]
transform = Transform3D(0.728777, 0.294253, -0.618303, 0, 0.902961, 0.429723, 0.684751, -0.313173, 0.658057, -2.36537, 1.99403, 3.29507)
+current = true
far = 150.0
target = NodePath("..")
diff --git a/client/menu/sounds/failure.ogg b/client/menu/sounds/failure.ogg
index cbe6db14..ef6d6ea4 100644
--- a/client/menu/sounds/failure.ogg
+++ b/client/menu/sounds/failure.ogg
Binary files differ
diff --git a/client/player/effect.gd b/client/player/effect.gd
index 8371d99d..fedf548f 100644
--- a/client/player/effect.gd
+++ b/client/player/effect.gd
@@ -1,18 +1,19 @@
# Undercooked - a game about cooking
-# Copyright 2024 nokoe, tpart
-#
+# Copyright 2024 nokoe
+# Copyright 2024 tpart
+#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3 of the License only.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
-#
+#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-#
+#
class_name Effect
extends Node3D
@@ -37,4 +38,8 @@ func set_effect(e: String):
push_warning("effect %s unknown" % e)
func clear_effect():
- $Stars.emitting = false
+ stars.emitting = false
+ success.stop()
+ angry.emitting = false
+ angry_grunt.stop_all()
+ failure.stop()