Merge branch 'main' into demo
This commit is contained in:
commit
fc538a2d2a
36 changed files with 958 additions and 58 deletions
|
@ -12,6 +12,7 @@ onready var ac_shard = $ShardSound
|
|||
onready var ac_pause_music = $PauseMusic
|
||||
onready var ac_menu = $MenuSound
|
||||
onready var ac_land = $LandSound
|
||||
onready var ac_voice = $Voice
|
||||
#Sounds
|
||||
const a_key = preload("res://audio/sounds/key.ogg")
|
||||
const a_arrow = preload("res://audio/sounds/arrow_collect.ogg")
|
||||
|
@ -50,9 +51,10 @@ var loop_section = null
|
|||
var has_looped = false
|
||||
|
||||
#Plays a sound
|
||||
func play_sound(snd,player):
|
||||
player.set_stream(snd)
|
||||
player._set_playing(true)
|
||||
func play_sound(snd: AudioStream, player: AudioStreamPlayer, pitch: float = 1.0):
|
||||
player.stream = snd
|
||||
player.pitch_scale = pitch
|
||||
player.play()
|
||||
|
||||
#Play music, if same track is already playing do nothing
|
||||
func play_music(song):
|
||||
|
|
|
@ -48,6 +48,8 @@ volume_db = -12.0
|
|||
volume_db = -15.0
|
||||
|
||||
[node name="LandSound" type="AudioStreamPlayer" parent="."]
|
||||
volume_db = -15.0
|
||||
|
||||
[node name="Voice" type="AudioStreamPlayer" parent="."]
|
||||
volume_db = -5.0
|
||||
|
||||
[connection signal="finished" from="ShardSound" to="." method="_on_ShardSound_finished"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue