diff options
author | nokoe <nokoe@mailbox.org> | 2024-07-03 15:04:02 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-07-03 15:04:02 +0200 |
commit | 11d2b799739d6e4a0fa7496a74cf10bff925b6ea (patch) | |
tree | b46927ad0a7629ee7753937f267141f62983faee /client/map | |
parent | e994feebe11e4c1d8b7f3825f2e1c9bbd2069e82 (diff) | |
download | hurrycurry-11d2b799739d6e4a0fa7496a74cf10bff925b6ea.tar hurrycurry-11d2b799739d6e4a0fa7496a74cf10bff925b6ea.tar.bz2 hurrycurry-11d2b799739d6e4a0fa7496a74cf10bff925b6ea.tar.zst |
add progress sound
Diffstat (limited to 'client/map')
-rw-r--r-- | client/map/items/food_processor.gd | 10 | ||||
-rw-r--r-- | client/map/items/food_processor_running.ogg | bin | 0 -> 16629 bytes | |||
-rw-r--r-- | client/map/items/food_processor_running.ogg.import | 19 | ||||
-rw-r--r-- | client/map/items/food_processor_stopping.ogg | bin | 0 -> 14288 bytes | |||
-rw-r--r-- | client/map/items/food_processor_stopping.ogg.import | 19 | ||||
-rw-r--r-- | client/map/items/item.gd | 1 |
6 files changed, 48 insertions, 1 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd index f2226e5f..006954ef 100644 --- a/client/map/items/food_processor.gd +++ b/client/map/items/food_processor.gd @@ -28,10 +28,18 @@ func progress(p: float, warn: bool): processing.emitting = true processing.rotation.y += p * TAU base.rotation.y += p * TAU + if sound_id == null: + sound_id = Sound.item_progress( + self, + preload("res://map/items/food_processor_running.ogg"), + preload("res://map/items/food_processor_stopping.ogg") + ) func finish(warn: bool): super(warn) - processing.emitting = false + if sound_id != null: + processing.emitting = false + Sound.item_finished(sound_id) static func base_position() -> Vector3: return Vector3(0., 0.4, 0.) diff --git a/client/map/items/food_processor_running.ogg b/client/map/items/food_processor_running.ogg Binary files differnew file mode 100644 index 00000000..10ebaf90 --- /dev/null +++ b/client/map/items/food_processor_running.ogg diff --git a/client/map/items/food_processor_running.ogg.import b/client/map/items/food_processor_running.ogg.import new file mode 100644 index 00000000..45f2249e --- /dev/null +++ b/client/map/items/food_processor_running.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://rxjywx4vm0v8" +path="res://.godot/imported/food_processor_running.ogg-41d9b8fef28296b1e1fe6d23f7a6b29a.oggvorbisstr" + +[deps] + +source_file="res://map/items/food_processor_running.ogg" +dest_files=["res://.godot/imported/food_processor_running.ogg-41d9b8fef28296b1e1fe6d23f7a6b29a.oggvorbisstr"] + +[params] + +loop=true +loop_offset=0.0 +bpm=0.0 +beat_count=0 +bar_beats=4 diff --git a/client/map/items/food_processor_stopping.ogg b/client/map/items/food_processor_stopping.ogg Binary files differnew file mode 100644 index 00000000..471e264a --- /dev/null +++ b/client/map/items/food_processor_stopping.ogg diff --git a/client/map/items/food_processor_stopping.ogg.import b/client/map/items/food_processor_stopping.ogg.import new file mode 100644 index 00000000..7e0d8f6d --- /dev/null +++ b/client/map/items/food_processor_stopping.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dghbc6sebonde" +path="res://.godot/imported/food_processor_stopping.ogg-6f8738c65f08cc9554ad7bbd457e5ac0.oggvorbisstr" + +[deps] + +source_file="res://map/items/food_processor_stopping.ogg" +dest_files=["res://.godot/imported/food_processor_stopping.ogg-6f8738c65f08cc9554ad7bbd457e5ac0.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/client/map/items/item.gd b/client/map/items/item.gd index fb55b230..868af444 100644 --- a/client/map/items/item.gd +++ b/client/map/items/item.gd @@ -22,6 +22,7 @@ var base: Node3D = Node3D.new() var progress_instance: ProgressBar3D = preload("res://map/progress.tscn").instantiate() var take_sound: PlayRandom = preload("res://audio/play_random.tscn").instantiate() var put_sound: PlayRandom = preload("res://audio/play_random.tscn").instantiate() +var sound_id func _init(owned_by_: Node3D): progress_instance.position.y = 1 |