diff --git a/scenes/enemy_table.tscn b/scenes/enemy_table.tscn index d16ccd5..15fc817 100644 --- a/scenes/enemy_table.tscn +++ b/scenes/enemy_table.tscn @@ -2,6 +2,7 @@ [ext_resource type="Shader" uid="uid://x02irwg8ynvp" path="res://shaders/pixel_highlight.gdshader" id="1_d4l8f"] [ext_resource type="Texture2D" uid="uid://cklakjbjislch" path="res://sprites/table.png" id="1_kcy6j"] +[ext_resource type="AudioStream" uid="uid://cs4pq5u144agp" path="res://sounds/MIRROR_SHATTER.wav" id="3_twce5"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_twce5"] shader = ExtResource("1_d4l8f") @@ -25,3 +26,7 @@ hframes = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=982140641] shape = SubResource("RectangleShape2D_d4l8f") + +[node name="MirrorShatter" type="AudioStreamPlayer2D" parent="." unique_id=1479442361] +stream = ExtResource("3_twce5") +volume_db = -13.178 diff --git a/scenes/main.gd b/scenes/main.gd index 1fb2a2a..bfd2916 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -81,6 +81,7 @@ func _on_player_died(): EventBus.goose_talk.emit(3) instance.queue_free() game_over.show() + $LevelAudio.stop() await get_tree().create_timer(2).timeout game_over.hide() $CanvasLayer/Title.show() @@ -125,6 +126,9 @@ func new_game(): # Tell the game we're playing. playing = true print("New game started!") + + # Play Level Music + $LevelAudio.play() func _input(EventInput): diff --git a/scenes/main.tscn b/scenes/main.tscn index 645999e..515e7dc 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -12,6 +12,7 @@ [ext_resource type="PackedScene" uid="uid://cd1kwb8klcsb5" path="res://scenes/goose.tscn" id="9_85g3d"] [ext_resource type="AudioStream" uid="uid://c3e8sdfqcikp6" path="res://sounds/welcome.wav" id="10_choun"] [ext_resource type="PackedScene" uid="uid://drf1k1iulvy6f" path="res://scenes/wave.tscn" id="11_ya4ey"] +[ext_resource type="AudioStream" uid="uid://c4rr5yd22wmof" path="res://sounds/Ambient 1.0.wav" id="12_trceg"] [sub_resource type="Animation" id="Animation_1bvp3"] length = 0.001 @@ -136,6 +137,10 @@ position = Vector2(118, 162) stream = ExtResource("10_choun") volume_db = -0.5 +[node name="LevelAudio" type="AudioStreamPlayer2D" parent="." unique_id=2125260365] +stream = ExtResource("12_trceg") +volume_db = -13.178 + [node name="Wave" parent="." unique_id=2117861058 instance=ExtResource("11_ya4ey")] [connection signal="pressed" from="CanvasLayer/CenterContainer/Start" to="." method="_on_start_pressed"] diff --git a/scenes/player.gd b/scenes/player.gd index 0f489d9..10f3972 100644 --- a/scenes/player.gd +++ b/scenes/player.gd @@ -116,13 +116,13 @@ func _on_gun_cooldown_timeout() -> void: func _on_area_entered(area): if area.is_in_group("enemies"): shield -= int(max_shield / 2) - # damage_taken.emit() + _on_damage_taken() area.hit_detection() if area.is_in_group("enemy_bullets") and self.monitoring == true: damage_taken.emit() - if area.is_in_group("shards"): - shield -= int(max_shield / 2) + #if area.is_in_group("shards"): + # shield -= int(max_shield / 2) func _on_damage_taken(): diff --git a/scenes/wave.gd b/scenes/wave.gd index e83e877..32a73d7 100644 --- a/scenes/wave.gd +++ b/scenes/wave.gd @@ -61,7 +61,10 @@ func spawn_enemies(): add_child(t) t.position = Vector2(screensize.x / 2, position.y + 125) await get_tree().create_timer(1.5).timeout - var ts = t.get_child(0) + var ts = t.get_child(2) + await get_tree().create_timer(.9).timeout + ts.play() + ts = t.get_child(0) ts.frame = 1 EventBus.flash_screen.emit(.25) await get_tree().create_timer(1.5).timeout diff --git a/sounds/Ambient 1.0.wav b/sounds/Ambient 1.0.wav new file mode 100644 index 0000000..e8867b7 Binary files /dev/null and b/sounds/Ambient 1.0.wav differ diff --git a/sounds/Ambient 1.0.wav.import b/sounds/Ambient 1.0.wav.import new file mode 100644 index 0000000..978361b --- /dev/null +++ b/sounds/Ambient 1.0.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://c4rr5yd22wmof" +path="res://.godot/imported/Ambient 1.0.wav-7eb74b277d0ccdf0e9132ce95904b256.sample" + +[deps] + +source_file="res://sounds/Ambient 1.0.wav" +dest_files=["res://.godot/imported/Ambient 1.0.wav-7eb74b277d0ccdf0e9132ce95904b256.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=2 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/sounds/MIRROR_SHATTER.wav b/sounds/MIRROR_SHATTER.wav new file mode 100644 index 0000000..9ab1688 Binary files /dev/null and b/sounds/MIRROR_SHATTER.wav differ diff --git a/sounds/MIRROR_SHATTER.wav.import b/sounds/MIRROR_SHATTER.wav.import new file mode 100644 index 0000000..dbb94e0 --- /dev/null +++ b/sounds/MIRROR_SHATTER.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cs4pq5u144agp" +path="res://.godot/imported/MIRROR_SHATTER.wav-6a9b05ad677ea7d6108bac87600f3937.sample" + +[deps] + +source_file="res://sounds/MIRROR_SHATTER.wav" +dest_files=["res://.godot/imported/MIRROR_SHATTER.wav-6a9b05ad677ea7d6108bac87600f3937.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