Fixed sound manager exports
This commit is contained in:
@@ -9,10 +9,10 @@ const MUSIC_BUS = "Music"
|
||||
|
||||
|
||||
@export_group("Pitch settings", "pitch")
|
||||
@export_range(0.9, 1.1, 0.01) var putch_ui_min := 1.0
|
||||
@export_range(0.9, 1.1, 0.01) var putch_ui_max := 1.0
|
||||
@export_range(0.9, 1.1, 0.01) var putch_sfx_min := 1.0
|
||||
@export_range(0.9, 1.1, 0.01) var putch_sfx_max := 1.0
|
||||
@export_range(0.9, 1.1, 0.01) var pitch_ui_min := 1.0
|
||||
@export_range(0.9, 1.1, 0.01) var pitch_ui_max := 1.0
|
||||
@export_range(0.9, 1.1, 0.01) var pitch_sfx_min := 1.0
|
||||
@export_range(0.9, 1.1, 0.01) var pitch_sfx_max := 1.0
|
||||
|
||||
@export_group("Number of players", "player_count")
|
||||
@export_range(1, 10) var player_count_ui := 1
|
||||
@@ -44,7 +44,7 @@ func _ready() -> void:
|
||||
func play_ui_stream(stream: AudioStream) -> AudioStreamPlayer:
|
||||
var player := _get_free_player(_ui_players)
|
||||
player.stream = stream
|
||||
player.pitch_scale = randf_range(putch_ui_min, putch_ui_max)
|
||||
player.pitch_scale = randf_range(pitch_ui_min, pitch_ui_max)
|
||||
player.play()
|
||||
return player
|
||||
|
||||
@@ -52,7 +52,7 @@ func play_ui_stream(stream: AudioStream) -> AudioStreamPlayer:
|
||||
func play_sfx_stream(stream: AudioStream, position: Vector2) -> AudioStreamPlayer2D:
|
||||
var player := _get_free_2d_player(_sfx_players)
|
||||
player.stream = stream
|
||||
player.pitch_scale = randf_range(putch_ui_min, putch_ui_max)
|
||||
player.pitch_scale = randf_range(pitch_ui_min, pitch_ui_max)
|
||||
player.position = position
|
||||
player.play()
|
||||
return player
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
[node name="SoundManager" type="Node" unique_id=1576371552]
|
||||
process_mode = 3
|
||||
script = ExtResource("1_cg0sy")
|
||||
pitch_ui_min = 0.9500000000000001
|
||||
pitch_ui_max = 1.05
|
||||
pitch_sfx_min = 0.9500000000000001
|
||||
pitch_sfx_max = 1.05
|
||||
player_count_ui = 8
|
||||
player_count_sfx = 32
|
||||
ui_stream_accept = ExtResource("2_ge1il")
|
||||
|
||||
Reference in New Issue
Block a user