Added some sound effects

This commit is contained in:
RealMelwei 2025-09-19 03:33:03 +02:00
parent 550f3c1e2f
commit 16d9639dd1
27 changed files with 193 additions and 10 deletions

View file

@ -92,5 +92,12 @@ func splash():
await get_tree().create_timer(5).timeout
attack_ready = true
func hurt(_dmg, _dir):
$AudioStreamPlayer2D.play()
func die():
for child in get_children():
if not child is AudioStreamPlayer2D:
child.queue_free()
await $AudioStreamPlayer2D.finished
queue_free()

View file

@ -59,4 +59,6 @@ collision_mask = 10
position = Vector2(0, 200)
shape = SubResource("RectangleShape2D_lnbgr")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
[connection signal="died" from="EnemyHurtbox" to="." method="die"]

View file

@ -35,7 +35,12 @@ func _physics_process(delta: float) -> void:
player.hurt(damage, self.global_position-player.global_position)
func _on_death():
for child in get_children():
if not child is AudioStreamPlayer2D:
child.queue_free()
await $AudioStreamPlayer2D.finished
self.queue_free()
func _on_damage_taken(_damage : int, dir: Vector2):
current_knockback = - dir * knockback_weight
$AudioStreamPlayer2D.play()

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://chu67ci7sl488"]
[gd_scene load_steps=10 format=3 uid="uid://chu67ci7sl488"]
[ext_resource type="Script" uid="uid://12jns4dppxxj" path="res://enemies/ghost/ghost.gd" id="1_6attn"]
[ext_resource type="PackedScene" uid="uid://mtfsdd4cdf3a" path="res://utils/enemy_hurtbox.tscn" id="2_34o1m"]
@ -6,6 +6,7 @@
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_obmiq"]
[ext_resource type="Texture2D" uid="uid://b8732t0313bqs" path="res://enemies/ghost/ghost animation/Ghost 0.png" id="3_rbwoc"]
[ext_resource type="Texture2D" uid="uid://dfhxhum8lek56" path="res://enemies/ghost/ghost animation/Ghost 2.png" id="4_4awot"]
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="7_eqcb8"]
[sub_resource type="CircleShape2D" id="CircleShape2D_6attn"]
@ -51,5 +52,8 @@ shape = SubResource("CircleShape2D_6attn")
[node name="EarthAligner" parent="." instance=ExtResource("3_obmiq")]
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("7_eqcb8")
[connection signal="damage_taken" from="EnemyHurtbox" to="." method="_on_damage_taken"]
[connection signal="died" from="EnemyHurtbox" to="." method="_on_death"]

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://5nb7pf8g1ck"]
[gd_scene load_steps=6 format=3 uid="uid://5nb7pf8g1ck"]
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech/leech.gd" id="1_wfsrb"]
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://enemies/leech/segment.tscn" id="2_7ngsb"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_vk62e"]
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_ps8gx"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
size = Vector2(2, 24)
@ -60,3 +61,6 @@ collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D2"]
position = Vector2(0, 14.8)
shape = SubResource("RectangleShape2D_cq6dk")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("4_ps8gx")

View file

@ -89,7 +89,12 @@ func calculate_segment_location_and_rotation (i) -> Dictionary:
func hurt(damage : int, _dir):
if iframe_time <= 0:
hp -= damage
$AudioStreamPlayer2D.play()
if(hp<=0):
for child in get_children():
if not child is AudioStreamPlayer2D:
child.queue_free()
await $AudioStreamPlayer2D.finished
queue_free()
else:
iframe_time = iframes

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://b62xcg0dd3vct"]
[gd_scene load_steps=6 format=3 uid="uid://b62xcg0dd3vct"]
[ext_resource type="Script" uid="uid://b70f2ylbb3btt" path="res://enemies/leech/leech.gd" id="1_6u582"]
[ext_resource type="PackedScene" uid="uid://cvoicwo2xnf7e" path="res://enemies/leech/segment.tscn" id="2_oqch2"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_0r7dp"]
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="4_b1m5t"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cq6dk"]
size = Vector2(2, 24)
@ -51,3 +52,6 @@ collision_mask = 8
[node name="CollisionShape2D" type="CollisionShape2D" parent="RayCast2D2"]
position = Vector2(0, 14.8)
shape = SubResource("RectangleShape2D_cq6dk")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("4_b1m5t")

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=6 format=3 uid="uid://ddn025xnjngko"]
[gd_scene load_steps=7 format=3 uid="uid://ddn025xnjngko"]
[ext_resource type="Script" uid="uid://bkcip66at5sug" path="res://items/active_items/bow/bow.gd" id="1_xppub"]
[ext_resource type="PackedScene" uid="uid://dfva4dhflxglr" path="res://items/active_items/bow/arrow.tscn" id="2_0id2q"]
[ext_resource type="Texture2D" uid="uid://cy70quh6k3s1j" path="res://icon.svg" id="2_gllxn"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="4_0id2q"]
[ext_resource type="AudioStream" uid="uid://bg1w0fyeyys2p" path="res://sounds/item-equip-6904.mp3" id="5_gfbg0"]
[sub_resource type="CircleShape2D" id="CircleShape2D_gllxn"]
@ -24,3 +25,6 @@ shape = SubResource("CircleShape2D_gllxn")
modulate = Color(0, 1, 0, 1)
scale = Vector2(0.45, 0.45)
texture = ExtResource("2_gllxn")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("5_gfbg0")

View file

@ -6,6 +6,7 @@ func actually_collect():
func activate():
$UpdashSound.play()
player.activate_cooldown()
player.reset_to_velocity = Vector2(0,1)
await get_tree().create_timer(0.1).timeout

View file

@ -1,9 +1,11 @@
[gd_scene load_steps=6 format=3 uid="uid://ewe36lqcjojk"]
[gd_scene load_steps=8 format=3 uid="uid://ewe36lqcjojk"]
[ext_resource type="Script" uid="uid://bbwsc2a2hd0ow" path="res://items/active_items/updash/updash.gd" id="1_ghbl6"]
[ext_resource type="Texture2D" uid="uid://dxcfkdhl4g24c" path="res://items/active_items/updash/updash.png" id="3_a5yxq"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_ktv3s"]
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_ssiqx"]
[ext_resource type="AudioStream" uid="uid://bg1w0fyeyys2p" path="res://sounds/item-equip-6904.mp3" id="5_ssiqx"]
[ext_resource type="AudioStream" uid="uid://ds0yw3au0quae" path="res://sounds/whoosh.mp3" id="6_mbe12"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ghbl6"]
radius = 12.6667
@ -35,3 +37,11 @@ scale = Vector2(0.8, 0.8)
texture = ExtResource("3_a5yxq")
[node name="EarthAligner" parent="." instance=ExtResource("3_ktv3s")]
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("5_ssiqx")
[node name="UpdashSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_mbe12")
volume_db = -5.0
pitch_scale = 1.23

View file

@ -13,6 +13,7 @@ func _physics_process(_delta: float) -> void:
func collect_animation():
self.visible = false
if self.has_node("AudioStreamPlayer2D"): $AudioStreamPlayer2D.play()
func collect():
push_error("Please specify item collection behavior")

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=6 format=3 uid="uid://b00185vygcka1"]
[gd_scene load_steps=7 format=3 uid="uid://b00185vygcka1"]
[ext_resource type="Script" uid="uid://b43fudwi47qfd" path="res://items/immediate_items/heal_item/heal_item.gd" id="1_3vbv8"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_evqwq"]
[ext_resource type="Texture2D" uid="uid://djfc7sdc8wxp6" path="res://player/Heart_cut.png" id="3_fvuym"]
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="4_sr4am"]
[ext_resource type="AudioStream" uid="uid://b37akn7hmk2r3" path="res://sounds/471834__keshafilm__health-pickup.wav" id="5_1ujdq"]
[sub_resource type="CircleShape2D" id="CircleShape2D_hvhjo"]
@ -25,3 +26,7 @@ texture = ExtResource("4_sr4am")
position = Vector2(4, -3)
scale = Vector2(1.4, 1.4)
texture = ExtResource("3_fvuym")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("5_1ujdq")
volume_db = -25.0

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=7 format=3 uid="uid://gwctb2xqsbj"]
[gd_scene load_steps=8 format=3 uid="uid://gwctb2xqsbj"]
[ext_resource type="Script" uid="uid://ce6fxbjarlvtk" path="res://items/immediate_items/healthup/healthup.gd" id="1_ivtxh"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_lolop"]
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_gb062"]
[ext_resource type="Texture2D" uid="uid://ctwu08w867gax" path="res://player/Heart_cut Grey.png" id="4_uq82b"]
[ext_resource type="Texture2D" uid="uid://djfc7sdc8wxp6" path="res://player/Heart_cut.png" id="5_m76tj"]
[ext_resource type="AudioStream" uid="uid://b37akn7hmk2r3" path="res://sounds/471834__keshafilm__health-pickup.wav" id="6_uq82b"]
[sub_resource type="CircleShape2D" id="CircleShape2D_rlcnv"]
@ -34,3 +35,7 @@ texture = ExtResource("4_uq82b")
position = Vector2(4, -3)
scale = Vector2(1.4, 1.4)
texture = ExtResource("5_m76tj")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_uq82b")
volume_db = -18.0

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=7 format=3 uid="uid://bbpf28ohayd8n"]
[gd_scene load_steps=8 format=3 uid="uid://bbpf28ohayd8n"]
[ext_resource type="Script" uid="uid://blg876atd71cg" path="res://items/permanent_items/backslash.gd" id="1_s4bdx"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_kiuxs"]
[ext_resource type="PackedScene" uid="uid://d3e3kuyeh6mr1" path="res://player/sword.tscn" id="2_u6vk4"]
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="4_legpc"]
[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash.png" id="5_qg660"]
[ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="6_qg660"]
[sub_resource type="CircleShape2D" id="CircleShape2D_hvhjo"]
@ -29,3 +30,6 @@ texture = ExtResource("4_legpc")
position = Vector2(-3, -2)
scale = Vector2(1.2, 1.2)
texture = ExtResource("5_qg660")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("6_qg660")

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=6 format=3 uid="uid://wc7kgtomy6xm"]
[gd_scene load_steps=7 format=3 uid="uid://wc7kgtomy6xm"]
[ext_resource type="Script" uid="uid://bnr7cpjuvy6xj" path="res://items/permanent_items/extrajump.gd" id="1_t7gtn"]
[ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_70c5v"]
[ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_hw3fr"]
[ext_resource type="Texture2D" uid="uid://dicx1uk4187dq" path="res://items/permanent_items/extrajump.png" id="3_t7gtn"]
[ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="5_kn13r"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hw3fr"]
size = Vector2(78, 82)
@ -27,3 +28,7 @@ texture = ExtResource("3_hw3fr")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.7, 0.7)
texture = ExtResource("3_t7gtn")
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("5_kn13r")
volume_db = -5.0

View file

@ -151,6 +151,7 @@ func manage_velocity(delta: float) -> void:
func hurt(dmg: int, dir: Vector2 = Vector2.ZERO):
if(inv_time <= 0):
$AudioStreamPlayer2D.play()
current_hp -= dmg
if(current_hp <= 0):
die()
@ -170,6 +171,7 @@ func _on_death_screen_visibility_changed() -> void:
handle_input = !handle_input
func play_double_jump_animation() -> void:
$AirJumpAudio.play()
var node = double_jump_animation.instantiate()
add_child(node)
node.position = Vector2(0, 5)

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://cmaovvr15b3qk"]
[gd_scene load_steps=15 format=3 uid="uid://cmaovvr15b3qk"]
[ext_resource type="Script" uid="uid://ddidj1uau28ck" path="res://player/player.gd" id="1_4flbx"]
[ext_resource type="Texture2D" uid="uid://c4xg25s8loxp0" path="res://player/Player_Walk/Walk 1.png" id="2_hg6s5"]
@ -10,6 +10,8 @@
[ext_resource type="Texture2D" uid="uid://y32k1koww7oy" path="res://player/Player_Walk/Walk 5.png" id="6_yllr7"]
[ext_resource type="Texture2D" uid="uid://bo7h3yc40kon3" path="res://player/Player_Walk/Walk 6.png" id="7_kb6p2"]
[ext_resource type="PackedScene" uid="uid://beotdg4etmevc" path="res://player/double_jump/double_jump_animation.tscn" id="10_8t03j"]
[ext_resource type="AudioStream" uid="uid://co07360hqn6fk" path="res://sounds/686321__cjspellsfish__punch-land-soft.wav" id="11_2ieo8"]
[ext_resource type="AudioStream" uid="uid://ds0yw3au0quae" path="res://sounds/whoosh.mp3" id="12_ebec5"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_onrkg"]
@ -64,3 +66,11 @@ position = Vector2(0, -2)
[node name="ActiveItemCooldown" type="Timer" parent="."]
one_shot = true
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("11_2ieo8")
[node name="AirJumpAudio" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("12_ebec5")
volume_db = -12.0
pitch_scale = 1.62

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bsfwn6phcuxlk"
path="res://.godot/imported/402767__lilmati__retro-coin-03.wav-0ec52c5bb728bb1af61b876e8c908bdd.sample"
[deps]
source_file="res://sounds/402767__lilmati__retro-coin-03.wav"
dest_files=["res://.godot/imported/402767__lilmati__retro-coin-03.wav-0ec52c5bb728bb1af61b876e8c908bdd.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

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://b37akn7hmk2r3"
path="res://.godot/imported/471834__keshafilm__health-pickup.wav-8242fea379787e9fb208cc05e8c8ac38.sample"
[deps]
source_file="res://sounds/471834__keshafilm__health-pickup.wav"
dest_files=["res://.godot/imported/471834__keshafilm__health-pickup.wav-8242fea379787e9fb208cc05e8c8ac38.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

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://pdd0sy3p4y0d"
path="res://.godot/imported/750240__universfield__coin-drop.mp3-ff686fa241dd4243c9265e61a6857561.mp3str"
[deps]
source_file="res://sounds/750240__universfield__coin-drop.mp3"
dest_files=["res://.godot/imported/750240__universfield__coin-drop.mp3-ff686fa241dd4243c9265e61a6857561.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
sounds/item-equip-6904.mp3 Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bg1w0fyeyys2p"
path="res://.godot/imported/item-equip-6904.mp3-e4e1ff433991acd79f103eb119ae778f.mp3str"
[deps]
source_file="res://sounds/item-equip-6904.mp3"
dest_files=["res://.godot/imported/item-equip-6904.mp3-e4e1ff433991acd79f103eb119ae778f.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
sounds/whoosh.mp3 Normal file

Binary file not shown.

19
sounds/whoosh.mp3.import Normal file
View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://ds0yw3au0quae"
path="res://.godot/imported/whoosh.mp3-a78574d66c5299262756b5f1cebb8d0c.mp3str"
[deps]
source_file="res://sounds/whoosh.mp3"
dest_files=["res://.godot/imported/whoosh.mp3-a78574d66c5299262756b5f1cebb8d0c.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4