menu sounds play from Audio.tscn, fixing certain selections not making any noise
This commit is contained in:
parent
bc75c3fd50
commit
9f89fccd64
3 changed files with 8 additions and 4 deletions
|
@ -10,7 +10,7 @@ onready var ac_cheat = $CodeEntrySound
|
||||||
onready var ac_boss = $BossSound
|
onready var ac_boss = $BossSound
|
||||||
onready var ac_shard = $ShardSound
|
onready var ac_shard = $ShardSound
|
||||||
onready var ac_pause_music = $PauseMusic
|
onready var ac_pause_music = $PauseMusic
|
||||||
onready var ac_looping_music = $LoopingMusic
|
onready var ac_menu = $MenuSound
|
||||||
#Sounds
|
#Sounds
|
||||||
const a_gold = preload("res://audio/sounds/key.wav")
|
const a_gold = preload("res://audio/sounds/key.wav")
|
||||||
const a_arrow = preload("res://audio/sounds/arrow_collect.ogg")
|
const a_arrow = preload("res://audio/sounds/arrow_collect.ogg")
|
||||||
|
|
|
@ -44,4 +44,7 @@ bus = "sound"
|
||||||
stream = ExtResource( 3 )
|
stream = ExtResource( 3 )
|
||||||
volume_db = -12.0
|
volume_db = -12.0
|
||||||
|
|
||||||
|
[node name="MenuSound" type="AudioStreamPlayer" parent="."]
|
||||||
|
volume_db = -15.0
|
||||||
|
|
||||||
[connection signal="finished" from="ShardSound" to="." method="_on_ShardSound_finished"]
|
[connection signal="finished" from="ShardSound" to="." method="_on_ShardSound_finished"]
|
||||||
|
|
|
@ -15,12 +15,13 @@ func play_select_sound():
|
||||||
var tune = CHROMATIC if notes_till_rumble > 0 else RUMBLE
|
var tune = CHROMATIC if notes_till_rumble > 0 else RUMBLE
|
||||||
if notes_till_rumble == 0:
|
if notes_till_rumble == 0:
|
||||||
current_note = 0
|
current_note = 0
|
||||||
select_sound.pitch_scale = pow(SEMITONE, tune[current_note])
|
Audio.ac_menu.pitch_scale = pow(SEMITONE, tune[current_note])
|
||||||
select_sound.play()
|
Audio.play_sound(Audio.a_select,Audio.ac_menu)
|
||||||
current_note = posmod(current_note + 1, tune.size())
|
current_note = posmod(current_note + 1, tune.size())
|
||||||
notes_till_rumble -= 1
|
notes_till_rumble -= 1
|
||||||
else:
|
else:
|
||||||
can_play = true
|
can_play = true
|
||||||
|
|
||||||
func play_confirm_sound():
|
func play_confirm_sound():
|
||||||
$"%ConfirmSound".play()
|
Audio.ac_menu.pitch_scale = 1
|
||||||
|
Audio.play_sound(Audio.a_confirm,Audio.ac_menu)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue