Skip to content

Commit

Permalink
Add sound effects
Browse files Browse the repository at this point in the history
  • Loading branch information
d10sfan committed Jan 6, 2024
1 parent da9f3d0 commit 88cf0da
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/asset_licenses/mixkit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some sounds from mixkit
Binary file added assets/audio/meow.wav
Binary file not shown.
24 changes: 24 additions & 0 deletions assets/audio/meow.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://63jn17bkoynd"
path="res://.godot/imported/meow.wav-b09e6ba736d1240ff1f3bdb0c219c21e.sample"

[deps]

source_file="res://assets/audio/meow.wav"
dest_files=["res://.godot/imported/meow.wav-b09e6ba736d1240ff1f3bdb0c219c21e.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=0
Binary file added assets/audio/success.wav
Binary file not shown.
24 changes: 24 additions & 0 deletions assets/audio/success.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://vk0kntg32yu6"
path="res://.godot/imported/success.wav-acf90dc2d24c72463e092506e2c6159d.sample"

[deps]

source_file="res://assets/audio/success.wav"
dest_files=["res://.godot/imported/success.wav-acf90dc2d24c72463e092506e2c6159d.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=0
13 changes: 12 additions & 1 deletion default_bus_layout.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://botltnrcdwbiq"]
[gd_resource type="AudioBusLayout" load_steps=2 format=3 uid="uid://botltnrcdwbiq"]

[sub_resource type="AudioEffectCompressor" id="AudioEffectCompressor_3k5sm"]
resource_name = "Compressor"

[resource]
bus/1/name = &"BackgroundMusic"
Expand All @@ -7,3 +10,11 @@ bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = 0.0
bus/1/send = &"Master"
bus/2/name = &"SoundEffects"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = &"Master"
bus/2/effect/0/effect = SubResource("AudioEffectCompressor_3k5sm")
bus/2/effect/0/enabled = true
2 changes: 1 addition & 1 deletion scenes/game/UI.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ grow_vertical = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 30
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 50
theme_override_constants/margin_bottom = 30

[node name="ScoreContainer" type="PanelContainer" parent="HUD/MarginContainer"]
layout_mode = 2
Expand Down
1 change: 1 addition & 0 deletions scenes/objects/Cat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ func fish_score_update(new_score):

func _on_area_2d_input_event(_viewport, event, _shape_idx):
if(event.is_action_pressed("ui_accept")):
SoundManager.play_sound(load("res://assets/audio/meow.wav"), "SoundEffects")
manual_animation_playing = true
animated_sprite.play("loaf")
1 change: 1 addition & 0 deletions scenes/objects/Fish.gd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func remove_self(success):
if success:
win_animation.visible = true
win_animation.play()
SoundManager.play_sound(load("res://assets/audio/success.wav"), "SoundEffects")
else:
delete_fish()

Expand Down

0 comments on commit 88cf0da

Please sign in to comment.