quality update and sound

This commit is contained in:
2024-01-26 18:28:18 +01:00
parent 6c30e59eaa
commit e31fd502ae
30 changed files with 232 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
extends AudioStreamPlayer3D
class_name SoundEffect3D
@export var audio_library: Array[SoundeffectResource]
@export_range(0,2) var pitch_variation: float
func play_key(key: String) -> void:
for res in audio_library:
if res.key == key:
stream = res.audio
pitch_scale = 1 + randf_range(pitch_variation * -1, pitch_variation)
play()
return
push_error(key + " is not available in the Audio Library variable")