File tree Expand file tree Collapse file tree 10 files changed +84
-8
lines changed
game_elements/props/filling_barrel
quests/lore_quests/quest_003/2_ink_drinker_levels/components Expand file tree Collapse file tree 10 files changed +84
-8
lines changed Original file line number Diff line number Diff line change 1- [gd_scene load_steps =4 format =3 uid ="uid://lea3l0ewp5fr" ]
1+ [gd_scene load_steps =6 format =3 uid ="uid://lea3l0ewp5fr" ]
22
33[ext_resource type ="PackedScene" uid ="uid://y8ha8abfyap2" path ="res://scenes/game_elements/props/filling_barrel/filling_barrel.tscn" id ="1_ab25j" ]
44[ext_resource type ="SpriteFrames" uid ="uid://ch0p31t4upx7w" path ="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/barrel_cracks/barrel_cracks.tres" id ="2_g6wko" ]
55[ext_resource type ="Script" uid ="uid://d05hp7ascndlr" path ="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/fragile_barrel.gd" id ="2_wal8y" ]
6+ [ext_resource type ="AudioStream" uid ="uid://bknpb07lvbded" path ="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/sounds/sfx_barrel_crack.tres" id ="4_sdj6j" ]
7+ [ext_resource type ="AudioStream" uid ="uid://c3iuv5ax8i78v" path ="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/sounds/sfx_barrel_breaking.tres" id ="5_v7k7g" ]
68
79[node name ="FragileBarrel" instance =ExtResource ("1_ab25j" )]
810script = ExtResource ("2_wal8y" )
911max_health = 4
1012
11- [node name ="AnimatedSprite2D" parent ="." index ="0" ]
12- animation = &"filling"
13- frame = 0
14- frame_progress = 0.0
15-
1613[node name ="CrackOverlay" type ="AnimatedSprite2D" parent ="." index ="1" ]
1714unique_name_in_owner = true
1815visible = false
1916position = Vector2 (0 , -21 )
2017sprite_frames = ExtResource ("2_g6wko" )
18+
19+ [node name ="CrackSound" type ="AudioStreamPlayer2D" parent ="." index ="6" ]
20+ unique_name_in_owner = true
21+ stream = ExtResource ("4_sdj6j" )
22+
23+ [node name ="ShatterSound" type ="AudioStreamPlayer2D" parent ="." index ="7" ]
24+ unique_name_in_owner = true
25+ stream = ExtResource ("5_v7k7g" )
Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ signal barrel_destroyed(barrel_instance: FragileBarrel)
1313var current_health : int
1414
1515@onready var crack_overlay_node : AnimatedSprite2D = % CrackOverlay
16+ @onready var crack_sound : AudioStreamPlayer2D = % CrackSound
17+ @onready var shatter_sound : AudioStreamPlayer2D = % ShatterSound
1618
1719
1820func _ready () -> void :
1921 super ._ready ()
2022 current_health = max_health
21-
2223 crack_overlay_node .visible = false
23- # Redundant stop() and frame reset removed as per code review
2424
2525
2626# Logic called by Projectile when it hits this object
@@ -41,6 +41,7 @@ func take_damage() -> void:
4141 if current_health <= 0 :
4242 break_barrel ()
4343 else :
44+ crack_sound .play ()
4445 update_cracks ()
4546
4647
@@ -61,6 +62,8 @@ func update_cracks() -> void:
6162func break_barrel () -> void :
6263 crack_overlay_node .visible = false
6364
65+ shatter_sound .play ()
66+
6467 # Play destruction animation directly
6568 animated_sprite_2d .play ("shatter" )
6669 await animated_sprite_2d .animation_finished
Original file line number Diff line number Diff line change 1+ version https://git-lfs.github.com/spec/v1
2+ oid sha256:0629705311cb9b3693971f95358205242b2b4b33da6cbb9c343c6e639021dd43
3+ size 14224
Original file line number Diff line number Diff line change 1+ [remap]
2+
3+ importer="oggvorbisstr"
4+ type="AudioStreamOggVorbis"
5+ uid="uid://d3d5cwdkgapw"
6+ path="res://.godot/imported/breaking.ogg-1791aca212f477220393863335804d06.oggvorbisstr"
7+
8+ [deps]
9+
10+ source_file="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/sounds/breaking.ogg"
11+ dest_files=["res://.godot/imported/breaking.ogg-1791aca212f477220393863335804d06.oggvorbisstr"]
12+
13+ [params]
14+
15+ loop=false
16+ loop_offset=0
17+ bpm=0
18+ beat_count=0
19+ bar_beats=4
Original file line number Diff line number Diff line change 1+ SPDX-License-Identifier: CC0-1.0
2+ SPDX-FileCopyrightText: 2021 Fission9
3+
4+ Tile Breaking by Fission9 -- https://freesound.org/s/583310/
Original file line number Diff line number Diff line change 1+ version https://git-lfs.github.com/spec/v1
2+ oid sha256:78b58808761de9a09af0899f1196fad7e516e0b4470952c5cd0f7d7c510441df
3+ size 15040
Original file line number Diff line number Diff line change 1+ [remap]
2+
3+ importer="oggvorbisstr"
4+ type="AudioStreamOggVorbis"
5+ uid="uid://j2pkrpimameb"
6+ path="res://.godot/imported/cracks.ogg-bcebe2c454e85910fbe1abd50c8980cf.oggvorbisstr"
7+
8+ [deps]
9+
10+ source_file="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/sounds/cracks.ogg"
11+ dest_files=["res://.godot/imported/cracks.ogg-bcebe2c454e85910fbe1abd50c8980cf.oggvorbisstr"]
12+
13+ [params]
14+
15+ loop=false
16+ loop_offset=0
17+ bpm=0
18+ beat_count=0
19+ bar_beats=4
Original file line number Diff line number Diff line change 1+ SPDX-FileCopyrightText: 2020 max2587
2+ SPDX-License-Identifier: CC-BY-4.0
3+
4+ glass 2.wav by max2587 -- https://freesound.org/s/548232/
Original file line number Diff line number Diff line change 1+ [gd_resource type ="AudioStreamRandomizer" load_steps =2 format =3 uid ="uid://c3iuv5ax8i78v" ]
2+
3+ [ext_resource type ="AudioStream" uid ="uid://d3d5cwdkgapw" path ="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/sounds/breaking.ogg" id ="1_kfwyl" ]
4+
5+ [resource ]
6+ random_pitch = 1.1
7+ streams_count = 1
8+ stream_0/stream = ExtResource ("1_kfwyl" )
Original file line number Diff line number Diff line change 1+ [gd_resource type ="AudioStreamRandomizer" load_steps =2 format =3 uid ="uid://bknpb07lvbded" ]
2+
3+ [ext_resource type ="AudioStream" uid ="uid://j2pkrpimameb" path ="res://scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/components/sounds/cracks.ogg" id ="1_2auby" ]
4+
5+ [resource ]
6+ random_pitch = 1.1
7+ streams_count = 1
8+ stream_0/stream = ExtResource ("1_2auby" )
You can’t perform that action at this time.
0 commit comments