Added gameplay music
This commit is contained in:
@@ -15,6 +15,8 @@ func _ready() -> void:
|
||||
pause_menu.hide()
|
||||
game_over_menu.hide()
|
||||
|
||||
SoundManager.play_music_stream(SoundManager.music_stream_gameplay)
|
||||
|
||||
if player_falling_at_start:
|
||||
player.velocity.y = player.max_fall_speed
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ var sfx_volume : int:
|
||||
_apply_audio_settings()
|
||||
_save_settings()
|
||||
|
||||
var _music_volume := 100
|
||||
var _music_volume := 50
|
||||
var music_volume : int:
|
||||
get():
|
||||
return _music_volume
|
||||
|
||||
@@ -38,6 +38,7 @@ const MUSIC_BUS = "Music"
|
||||
@export var sfx_stream_switch : AudioStream
|
||||
|
||||
@export_group("Music Streams", "music_stream")
|
||||
@export var music_stream_gameplay : AudioStream
|
||||
@export var music_stream_main_menu : AudioStream
|
||||
|
||||
|
||||
@@ -70,6 +71,8 @@ func play_sfx_stream(stream: AudioStream, position: Vector2) -> AudioStreamPlaye
|
||||
|
||||
|
||||
func play_music_stream(stream: AudioStream) -> AudioStreamPlayer:
|
||||
if _music_player.stream == stream: return
|
||||
|
||||
_music_player.stream = stream
|
||||
_music_player.play()
|
||||
return _music_player
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://drk4dvbn78dva"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://drk4dvbn78dva"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cx5qcukr66whc" path="res://game/managers/sound_manager.gd" id="1_cg0sy"]
|
||||
[ext_resource type="AudioStream" uid="uid://d2suvaisb6w45" path="res://sound/ui/accept.wav" id="2_ge1il"]
|
||||
@@ -17,6 +17,7 @@
|
||||
[ext_resource type="AudioStream" uid="uid://dy7qnen5k20mo" path="res://sound/sfx/player_spoted.wav" id="9_q7cyi"]
|
||||
[ext_resource type="AudioStream" uid="uid://dg0t7fwu8u3m2" path="res://sound/sfx/door_unlocking.wav" id="10_lqyhh"]
|
||||
[ext_resource type="AudioStream" uid="uid://ckmpft46wjgqs" path="res://sound/music/main_menu.wav" id="17_g6nb7"]
|
||||
[ext_resource type="AudioStream" uid="uid://ttemdy7avyh7" path="res://sound/music/gameplay.wav" id="17_l5yxe"]
|
||||
|
||||
[node name="SoundManager" type="Node"]
|
||||
process_mode = 3
|
||||
@@ -42,4 +43,5 @@ sfx_stream_level_completed = ExtResource("7_22ptj")
|
||||
sfx_stream_player_lost = ExtResource("8_6ll5c")
|
||||
sfx_stream_player_spoted = ExtResource("9_q7cyi")
|
||||
sfx_stream_switch = ExtResource("7_ab171")
|
||||
music_stream_gameplay = ExtResource("17_l5yxe")
|
||||
music_stream_main_menu = ExtResource("17_g6nb7")
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://ttemdy7avyh7"
|
||||
path="res://.godot/imported/gameplay.wav-f08007361da4b090c74e3abfcf5f980c.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sound/music/gameplay.wav"
|
||||
dest_files=["res://.godot/imported/gameplay.wav-f08007361da4b090c74e3abfcf5f980c.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Reference in New Issue
Block a user