diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..eb4accc --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,3 @@ +[gd_resource type="AudioBusLayout" format=2] + +[resource] diff --git a/project.godot b/project.godot index a0fe573..59a010b 100644 --- a/project.godot +++ b/project.godot @@ -20,6 +20,7 @@ config/icon="res://icon.png" Global="*res://src/scripts/global.gd" Window="*res://src/scripts/window.gd" +Music="*res://src/music/Music.tscn" [display] diff --git a/res/music/spooky_melody.wav b/res/music/spooky_melody.wav new file mode 100644 index 0000000..b36168b Binary files /dev/null and b/res/music/spooky_melody.wav differ diff --git a/res/music/spooky_melody.wav.import b/res/music/spooky_melody.wav.import new file mode 100644 index 0000000..b2da128 --- /dev/null +++ b/res/music/spooky_melody.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/spooky_melody.wav-58b9252705e57fd7f96d1cdf18eefa4e.sample" + +[deps] + +source_file="res://res/music/spooky_melody.wav" +dest_files=[ "res://.import/spooky_melody.wav-58b9252705e57fd7f96d1cdf18eefa4e.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=0 diff --git a/res/sounds/bat/damaged.ogg b/res/sounds/bat/damaged.ogg new file mode 100644 index 0000000..589af82 Binary files /dev/null and b/res/sounds/bat/damaged.ogg differ diff --git a/res/sounds/bat/damaged.ogg.import b/res/sounds/bat/damaged.ogg.import new file mode 100644 index 0000000..e914e41 --- /dev/null +++ b/res/sounds/bat/damaged.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/damaged.ogg-ef3864fff26832b4277374ecefd47594.oggstr" + +[deps] + +source_file="res://res/sounds/bat/damaged.ogg" +dest_files=[ "res://.import/damaged.ogg-ef3864fff26832b4277374ecefd47594.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/res/sounds/bat/screem.wav b/res/sounds/bat/screem.wav new file mode 100644 index 0000000..1f9b95f Binary files /dev/null and b/res/sounds/bat/screem.wav differ diff --git a/res/sounds/bat/screem.wav.import b/res/sounds/bat/screem.wav.import new file mode 100644 index 0000000..3d71941 --- /dev/null +++ b/res/sounds/bat/screem.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/screem.wav-a312a8c51198eded3146287bc691f4b5.sample" + +[deps] + +source_file="res://res/sounds/bat/screem.wav" +dest_files=[ "res://.import/screem.wav-a312a8c51198eded3146287bc691f4b5.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 diff --git a/res/sounds/ghost/damaged.wav b/res/sounds/ghost/damaged.wav new file mode 100644 index 0000000..a7fc0aa Binary files /dev/null and b/res/sounds/ghost/damaged.wav differ diff --git a/res/sounds/ghost/damaged.wav.import b/res/sounds/ghost/damaged.wav.import new file mode 100644 index 0000000..147a241 --- /dev/null +++ b/res/sounds/ghost/damaged.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/damaged.wav-5277eccc029ce5c891689738059032db.sample" + +[deps] + +source_file="res://res/sounds/ghost/damaged.wav" +dest_files=[ "res://.import/damaged.wav-5277eccc029ce5c891689738059032db.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 diff --git a/res/sounds/ghost/dash.wav b/res/sounds/ghost/dash.wav new file mode 100644 index 0000000..c975eb1 Binary files /dev/null and b/res/sounds/ghost/dash.wav differ diff --git a/res/sounds/ghost/dash.wav.import b/res/sounds/ghost/dash.wav.import new file mode 100644 index 0000000..8c52150 --- /dev/null +++ b/res/sounds/ghost/dash.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/dash.wav-fdd5a3034ef02ad426b8c740ecaa536e.sample" + +[deps] + +source_file="res://res/sounds/ghost/dash.wav" +dest_files=[ "res://.import/dash.wav-fdd5a3034ef02ad426b8c740ecaa536e.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 diff --git a/res/sounds/ghost/dash_charge.wav b/res/sounds/ghost/dash_charge.wav new file mode 100644 index 0000000..4fd176e Binary files /dev/null and b/res/sounds/ghost/dash_charge.wav differ diff --git a/res/sounds/ghost/dash_charge.wav.import b/res/sounds/ghost/dash_charge.wav.import new file mode 100644 index 0000000..6beefe1 --- /dev/null +++ b/res/sounds/ghost/dash_charge.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/dash_charge.wav-24246d9e1d7754c4d814c3755a4accce.sample" + +[deps] + +source_file="res://res/sounds/ghost/dash_charge.wav" +dest_files=[ "res://.import/dash_charge.wav-24246d9e1d7754c4d814c3755a4accce.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 diff --git a/res/sounds/menu/click.wav b/res/sounds/menu/click.wav new file mode 100644 index 0000000..12b09a6 Binary files /dev/null and b/res/sounds/menu/click.wav differ diff --git a/res/sounds/menu/click.wav.import b/res/sounds/menu/click.wav.import new file mode 100644 index 0000000..509674d --- /dev/null +++ b/res/sounds/menu/click.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/click.wav-78083de3653aaf877543d9afc12e01c9.sample" + +[deps] + +source_file="res://res/sounds/menu/click.wav" +dest_files=[ "res://.import/click.wav-78083de3653aaf877543d9afc12e01c9.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 diff --git a/res/sounds/menu/hovering.wav b/res/sounds/menu/hovering.wav new file mode 100644 index 0000000..34a4ec6 Binary files /dev/null and b/res/sounds/menu/hovering.wav differ diff --git a/res/sounds/menu/hovering.wav.import b/res/sounds/menu/hovering.wav.import new file mode 100644 index 0000000..88ed23d --- /dev/null +++ b/res/sounds/menu/hovering.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/hovering.wav-d72f0f8b8490c6f38a2a4a9caab890d7.sample" + +[deps] + +source_file="res://res/sounds/menu/hovering.wav" +dest_files=[ "res://.import/hovering.wav-d72f0f8b8490c6f38a2a4a9caab890d7.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 diff --git a/res/sounds/player/damaged.wav b/res/sounds/player/damaged.wav new file mode 100644 index 0000000..c7148f2 Binary files /dev/null and b/res/sounds/player/damaged.wav differ diff --git a/res/sounds/player/damaged.wav.import b/res/sounds/player/damaged.wav.import new file mode 100644 index 0000000..1cd180b --- /dev/null +++ b/res/sounds/player/damaged.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/damaged.wav-8a31f29c474696d68bdfce734cad7107.sample" + +[deps] + +source_file="res://res/sounds/player/damaged.wav" +dest_files=[ "res://.import/damaged.wav-8a31f29c474696d68bdfce734cad7107.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 diff --git a/res/sounds/player/dead.wav b/res/sounds/player/dead.wav new file mode 100644 index 0000000..a09ea23 Binary files /dev/null and b/res/sounds/player/dead.wav differ diff --git a/res/sounds/player/dead.wav.import b/res/sounds/player/dead.wav.import new file mode 100644 index 0000000..1d946a6 --- /dev/null +++ b/res/sounds/player/dead.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/dead.wav-443fea6f2f3d843b1dc7ce939062b67e.sample" + +[deps] + +source_file="res://res/sounds/player/dead.wav" +dest_files=[ "res://.import/dead.wav-443fea6f2f3d843b1dc7ce939062b67e.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 diff --git a/res/sounds/player/spell/cast 2sec v2.wav b/res/sounds/player/spell/cast 2sec v2.wav new file mode 100644 index 0000000..5591858 Binary files /dev/null and b/res/sounds/player/spell/cast 2sec v2.wav differ diff --git a/res/sounds/player/spell/cast 2sec v2.wav.import b/res/sounds/player/spell/cast 2sec v2.wav.import new file mode 100644 index 0000000..211fc29 --- /dev/null +++ b/res/sounds/player/spell/cast 2sec v2.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/cast 2sec v2.wav-aac818458386a70f835a0b3675539ce4.sample" + +[deps] + +source_file="res://res/sounds/player/spell/cast 2sec v2.wav" +dest_files=[ "res://.import/cast 2sec v2.wav-aac818458386a70f835a0b3675539ce4.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 diff --git a/res/sounds/player/spell/cast 2sec.wav b/res/sounds/player/spell/cast 2sec.wav new file mode 100644 index 0000000..3886882 Binary files /dev/null and b/res/sounds/player/spell/cast 2sec.wav differ diff --git a/res/sounds/player/spell/cast 2sec.wav.import b/res/sounds/player/spell/cast 2sec.wav.import new file mode 100644 index 0000000..829f306 --- /dev/null +++ b/res/sounds/player/spell/cast 2sec.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/cast 2sec.wav-2a911b51cc7dc2ed85eeaa2ce673a80e.sample" + +[deps] + +source_file="res://res/sounds/player/spell/cast 2sec.wav" +dest_files=[ "res://.import/cast 2sec.wav-2a911b51cc7dc2ed85eeaa2ce673a80e.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 diff --git a/res/sounds/player/spell/release.wav b/res/sounds/player/spell/release.wav new file mode 100644 index 0000000..2d2b66f Binary files /dev/null and b/res/sounds/player/spell/release.wav differ diff --git a/res/sounds/player/spell/release.wav.import b/res/sounds/player/spell/release.wav.import new file mode 100644 index 0000000..af6951d --- /dev/null +++ b/res/sounds/player/spell/release.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/release.wav-7f03452ab803a63aa8e58e4290b59108.sample" + +[deps] + +source_file="res://res/sounds/player/spell/release.wav" +dest_files=[ "res://.import/release.wav-7f03452ab803a63aa8e58e4290b59108.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 diff --git a/res/sounds/rat/damaged.wav b/res/sounds/rat/damaged.wav new file mode 100644 index 0000000..bcd8025 Binary files /dev/null and b/res/sounds/rat/damaged.wav differ diff --git a/res/sounds/rat/damaged.wav.import b/res/sounds/rat/damaged.wav.import new file mode 100644 index 0000000..8c96d43 --- /dev/null +++ b/res/sounds/rat/damaged.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/damaged.wav-3bc8c443ad7a0d1ee5609c5ed7ffa7de.sample" + +[deps] + +source_file="res://res/sounds/rat/damaged.wav" +dest_files=[ "res://.import/damaged.wav-3bc8c443ad7a0d1ee5609c5ed7ffa7de.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 diff --git a/res/sounds/trash/charge.wav b/res/sounds/trash/charge.wav new file mode 100644 index 0000000..94b6327 Binary files /dev/null and b/res/sounds/trash/charge.wav differ diff --git a/res/sounds/trash/charge.wav.import b/res/sounds/trash/charge.wav.import new file mode 100644 index 0000000..ae230a5 --- /dev/null +++ b/res/sounds/trash/charge.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/charge.wav-d04cee2937b8b13fb6f761a25f8ffdc5.sample" + +[deps] + +source_file="res://res/sounds/trash/charge.wav" +dest_files=[ "res://.import/charge.wav-d04cee2937b8b13fb6f761a25f8ffdc5.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 diff --git a/res/sounds/trash/rolling_loop_2_sec.wav b/res/sounds/trash/rolling_loop_2_sec.wav new file mode 100644 index 0000000..57fba32 Binary files /dev/null and b/res/sounds/trash/rolling_loop_2_sec.wav differ diff --git a/res/sounds/trash/rolling_loop_2_sec.wav.import b/res/sounds/trash/rolling_loop_2_sec.wav.import new file mode 100644 index 0000000..b8a711e --- /dev/null +++ b/res/sounds/trash/rolling_loop_2_sec.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/rolling_loop_2_sec.wav-90ea17041d7c708923e9e073c1ecdd45.sample" + +[deps] + +source_file="res://res/sounds/trash/rolling_loop_2_sec.wav" +dest_files=[ "res://.import/rolling_loop_2_sec.wav-90ea17041d7c708923e9e073c1ecdd45.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 diff --git a/res/sounds/trash/spawn.wav b/res/sounds/trash/spawn.wav new file mode 100644 index 0000000..2bcc520 Binary files /dev/null and b/res/sounds/trash/spawn.wav differ diff --git a/res/sounds/trash/spawn.wav.import b/res/sounds/trash/spawn.wav.import new file mode 100644 index 0000000..69e9947 --- /dev/null +++ b/res/sounds/trash/spawn.wav.import @@ -0,0 +1,23 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/spawn.wav-93e370ca8168f75c3a185b538ab97555.sample" + +[deps] + +source_file="res://res/sounds/trash/spawn.wav" +dest_files=[ "res://.import/spawn.wav-93e370ca8168f75c3a185b538ab97555.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 diff --git a/src/models/player/Player.tscn b/src/models/player/Player.tscn index 7a091dc..0a28fdd 100644 --- a/src/models/player/Player.tscn +++ b/src/models/player/Player.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://src/models/player/sprites/player_spriteframes.tres" type="SpriteFrames" id=1] [ext_resource path="res://src/models/player/player.gd" type="Script" id=2] [ext_resource path="res://res/shaders/colorize.tres" type="Material" id=3] [ext_resource path="res://src/models/shadow/shadow.png" type="Texture" id=4] [ext_resource path="res://src/models/player/stars/stars_spriteframes.tres" type="SpriteFrames" id=5] +[ext_resource path="res://res/sounds/player/damaged.wav" type="AudioStream" id=6] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 3.5, 3.5 ) @@ -126,4 +127,7 @@ animation = "idle" frame = 3 playing = true +[node name="AudioGetDamage" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 6 ) + [connection signal="area_entered" from="EnemyCollision" to="." method="area_entered"] diff --git a/src/models/player/player.gd b/src/models/player/player.gd index 1cdcf8a..fcb4822 100644 --- a/src/models/player/player.gd +++ b/src/models/player/player.gd @@ -58,6 +58,7 @@ func area_entered(area): var parent = area.get_parent() if parent.is_in_group("enemy") and not parent.is_in_group("bat") and not invincible: $AnimationPlayer.play("damage") + $AudioGetDamage.play() Global.add_health(-1) invincible = true invincibility_timer = .0 diff --git a/src/music/Music.tscn b/src/music/Music.tscn new file mode 100644 index 0000000..21c534e --- /dev/null +++ b/src/music/Music.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://res/music/spooky_melody.wav" type="AudioStream" id=1] + +[node name="Music" type="AudioStreamPlayer"] +stream = ExtResource( 1 ) +autoplay = true diff --git a/src/scenes/menu/Menu.tscn b/src/scenes/menu/Menu.tscn index 543afe6..8bab30d 100644 --- a/src/scenes/menu/Menu.tscn +++ b/src/scenes/menu/Menu.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://src/scenes/menu/menu.gd" type="Script" id=1] [ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=2] [ext_resource path="res://res/themes/default.tres" type="Theme" id=3] [ext_resource path="res://src/scenes/menu/button/button_outline.png" type="Texture" id=4] +[ext_resource path="res://res/sounds/menu/click.wav" type="AudioStream" id=5] +[ext_resource path="res://res/sounds/menu/hovering.wav" type="AudioStream" id=6] [node name="Menu" type="Node"] script = ExtResource( 1 ) @@ -51,6 +53,12 @@ patch_margin_top = 2 patch_margin_right = 2 patch_margin_bottom = 2 +[node name="AudioClick" type="AudioStreamPlayer" parent="UI/PlayButton"] +stream = ExtResource( 5 ) + +[node name="AudioHovering" type="AudioStreamPlayer" parent="UI/PlayButton"] +stream = ExtResource( 6 ) + [node name="ExitButton" type="Button" parent="UI"] margin_left = 20.0 margin_top = 100.0 @@ -70,6 +78,12 @@ patch_margin_top = 2 patch_margin_right = 2 patch_margin_bottom = 2 +[node name="AudioClick" type="AudioStreamPlayer" parent="UI/ExitButton"] +stream = ExtResource( 5 ) + +[node name="AudioHovering" type="AudioStreamPlayer" parent="UI/ExitButton"] +stream = ExtResource( 6 ) + [node name="Label" type="Label" parent="UI"] margin_left = 192.0 margin_top = 56.0 @@ -80,5 +94,9 @@ text = "Manskage iLunaiLuna JustDzhi" +[connection signal="mouse_entered" from="UI/PlayButton" to="." method="_on_PlayButton_mouse_entered"] +[connection signal="mouse_exited" from="UI/PlayButton" to="." method="_on_PlayButton_mouse_exited"] [connection signal="pressed" from="UI/PlayButton" to="." method="game_start"] +[connection signal="mouse_entered" from="UI/ExitButton" to="." method="_on_ExitButton_mouse_entered"] +[connection signal="mouse_exited" from="UI/ExitButton" to="." method="_on_ExitButton_mouse_exited"] [connection signal="pressed" from="UI/ExitButton" to="." method="game_exit"] diff --git a/src/scenes/menu/menu.gd b/src/scenes/menu/menu.gd index 11ecf52..af8a99f 100644 --- a/src/scenes/menu/menu.gd +++ b/src/scenes/menu/menu.gd @@ -1,7 +1,23 @@ extends Node func game_start(): + $UI/ExitButton/AudioClick.play() Global.game_start() func game_exit(): + $UI/ExitButton/AudioClick.play() get_tree().quit(0) + +func _on_PlayButton_mouse_entered(): + $UI/PlayButton.rect_position.y -= 2 + $UI/ExitButton/AudioHovering.play() + +func _on_PlayButton_mouse_exited(): + $UI/PlayButton.rect_position.y += 2 + +func _on_ExitButton_mouse_entered(): + $UI/ExitButton.rect_position.y -= 2 + $UI/ExitButton/AudioHovering.play() + +func _on_ExitButton_mouse_exited(): + $UI/ExitButton.rect_position.y += 2