Compare commits

..

2 Commits

Author SHA1 Message Date
c57a08f5da add click sound as SFX 2025-08-03 15:14:18 +04:00
542cf6a4f1 move sources.yml file to root 2025-08-03 15:13:41 +04:00
7 changed files with 46 additions and 2 deletions

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://briuh6uhf0tdt"
path="res://.godot/imported/817587__silverdubloons__tick06.wav-6928d7a957ad4e7ff0ddda00a7348675.sample"
[deps]
source_file="res://audio/817587__silverdubloons__tick06.wav"
dest_files=["res://.godot/imported/817587__silverdubloons__tick06.wav-6928d7a957ad4e7ff0ddda00a7348675.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

View File

@@ -1,2 +0,0 @@
- fileName: Space Horror InGame Music (Exploration) _Clement Panchout
commonUrl: https://clement-panchout.itch.io/yet-another-free-music-pack

View File

@@ -1,13 +1,19 @@
extends Node
const MUSIC_PATH := "res://audio/Space Horror InGame Music (Exploration) _Clement Panchout.wav"
const UI_CLICK_SOUND_PATH := "res://audio/817587__silverdubloons__tick06.wav"
var music_player: AudioStreamPlayer
var ui_click_player: AudioStreamPlayer
func _ready():
music_player = AudioStreamPlayer.new()
add_child(music_player)
ui_click_player = AudioStreamPlayer.new()
ui_click_player.bus = "SFX"
add_child(ui_click_player)
var orig_stream = _load_stream()
if not orig_stream:
push_error("Failed to load music stream: %s" % MUSIC_PATH)
@@ -59,3 +65,9 @@ func _stop_music() -> void:
if not music_player.playing:
return
music_player.stop()
func play_ui_click() -> void:
var click_stream = load(UI_CLICK_SOUND_PATH)
if click_stream and click_stream is AudioStream:
ui_click_player.stream = click_stream
ui_click_player.play()

View File

@@ -6,12 +6,15 @@ func _ready():
print("MainMenu ready")
func _on_new_game_button_pressed():
AudioManager.play_ui_click()
print("New Game pressed")
func _on_settings_button_pressed():
AudioManager.play_ui_click()
print("Settings pressed")
open_settings.emit()
func _on_exit_button_pressed():
AudioManager.play_ui_click()
print("Exit pressed")
get_tree().quit()

View File

@@ -60,6 +60,7 @@ func _input(event):
get_viewport().set_input_as_handled()
func _on_back_button_pressed():
AudioManager.play_ui_click()
print("Back button pressed")
_exit_settings()
@@ -96,6 +97,7 @@ func update_text():
func _on_reset_setting_button_pressed() -> void:
AudioManager.play_ui_click()
print("Resetting settings")
settings_manager.reset_settings_to_defaults()
_update_controls_from_settings()

5
sources.yaml Normal file
View File

@@ -0,0 +1,5 @@
---
- fileName: audio/Space Horror InGame Music (Exploration) _Clement Panchout.wav
commonUrl: https://clement-panchout.itch.io/yet-another-free-music-pack
- fileName: audio/817587__silverdubloons__tick06.wav
commonUrl: https://freesound.org/people/SilverDubloons/sounds/817587/