diff options
author | Jonas Bernard <public.jbernard@web.de> | 2021-04-26 22:20:38 +0200 |
---|---|---|
committer | Jonas Bernard <public.jbernard@web.de> | 2021-04-26 22:20:38 +0200 |
commit | 518ad95f5a8d9406a8010c22537343493005dc01 (patch) | |
tree | d5728a22e87aa99e71a603c85461fc0fe69db89a | |
parent | 6fb5e447659efe06045b22a8cac7ef4d7a4445db (diff) | |
download | ldjam48-518ad95f5a8d9406a8010c22537343493005dc01.tar.gz ldjam48-518ad95f5a8d9406a8010c22537343493005dc01.tar.bz2 ldjam48-518ad95f5a8d9406a8010c22537343493005dc01.zip |
Sound effercts
28 files changed, 140 insertions, 18 deletions
diff --git a/.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.md5 b/.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.md5 new file mode 100644 index 0000000..6872abc --- /dev/null +++ b/.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.md5 @@ -0,0 +1,3 @@ +source_md5="00df1708b38ae6293c58f5abcab3d297" +dest_md5="d532af2cc921957beb3c4d5158819ad1" + diff --git a/.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.sample b/.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.sample Binary files differnew file mode 100644 index 0000000..5b5ad33 --- /dev/null +++ b/.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.sample diff --git a/.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.md5 b/.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.md5 new file mode 100644 index 0000000..e67031e --- /dev/null +++ b/.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.md5 @@ -0,0 +1,3 @@ +source_md5="adff4ca727866862fa6e239ca00707ba" +dest_md5="36b62b31157353ec66a37c71b794da40" + diff --git a/.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.sample b/.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.sample Binary files differnew file mode 100644 index 0000000..399678f --- /dev/null +++ b/.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.sample diff --git a/.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.md5 b/.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.md5 new file mode 100644 index 0000000..0a59ca0 --- /dev/null +++ b/.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.md5 @@ -0,0 +1,3 @@ +source_md5="ad6270e07291bed5fbecdd6b23237a67" +dest_md5="457ee2c152bcefbdb33c3ccf091ee8c7" + diff --git a/.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.sample b/.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.sample Binary files differnew file mode 100644 index 0000000..f7a0719 --- /dev/null +++ b/.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.sample diff --git a/.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.md5 b/.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.md5 new file mode 100644 index 0000000..7175a89 --- /dev/null +++ b/.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.md5 @@ -0,0 +1,3 @@ +source_md5="d43e887b34d65b7b922d865b76487fc0" +dest_md5="c2de6ab466af540070cc912977e943fe" + diff --git a/.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.sample b/.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.sample Binary files differnew file mode 100644 index 0000000..d3fcbe8 --- /dev/null +++ b/.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.sample diff --git a/components/button.gd b/components/button.gd index 734e048..e3d12b8 100644 --- a/components/button.gd +++ b/components/button.gd @@ -5,7 +5,7 @@ export var text = "Hello, Button" export var fixed_width = -1 signal on_click() var is_hovered = false - +var disabled = false ############# @@ -59,6 +59,9 @@ func _on_ButtonTest_input_event(viewport, event, shape_idx): _set_pressed(true) if not (event.button_index == BUTTON_LEFT): return + if disabled: + return + BackgroundMusic.click_sound() emit_signal("on_click") func _set_all_textures(l, m, r): @@ -77,6 +80,7 @@ func _set_pressed(press: bool): func _on_ButtonTest_mouse_entered(): if not is_hovered: _set_all_textures(left_hover, middle_hover, right_hover) + BackgroundMusic.hover_sound() is_hovered = true diff --git a/components/button.tscn b/components/button.tscn index e3d784a..153f469 100644 --- a/components/button.tscn +++ b/components/button.tscn @@ -24,7 +24,6 @@ scale = Vector2( 4, 4 ) texture = ExtResource( 1 ) [node name="Hitbox" type="CollisionShape2D" parent="."] - [connection signal="input_event" from="." to="." method="_on_ButtonTest_input_event"] [connection signal="mouse_entered" from="." to="." method="_on_ButtonTest_mouse_entered"] [connection signal="mouse_exited" from="." to="." method="_on_ButtonTest_mouse_exited"] diff --git a/components/textreveal.gd b/components/textreveal.gd index 7b96eb3..9b5bfaa 100644 --- a/components/textreveal.gd +++ b/components/textreveal.gd @@ -32,6 +32,8 @@ func _process(delta): var additional = int(t) t -= additional revealed += additional + if additional >= 1: + BackgroundMusic.type_sound() text = to_render.substr(0, revealed) rect_position = -rect_size / 2 + Vector2(xpos, ypos) if to_render.length() <= revealed: diff --git a/project.godot b/project.godot index 8780a66..471262c 100644 --- a/project.godot +++ b/project.godot @@ -39,11 +39,6 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://components/PathRenderer.gd" }, { -"base": "Area2D", -"class": "Spaceship", -"language": "GDScript", -"path": "res://scenes/levels/pixel/spaceship.gd" -}, { "base": "Label", "class": "TextReveal", "language": "GDScript", @@ -56,7 +51,6 @@ _global_script_class_icons={ "Card": "", "Level": "", "PathRenderer": "", -"Spaceship": "", "TextReveal": "" } diff --git a/scenes/background_music.gd b/scenes/background_music.gd index 3fb62c8..e2622ae 100644 --- a/scenes/background_music.gd +++ b/scenes/background_music.gd @@ -2,3 +2,15 @@ extends Node func _on_AudioStreamPlayer_finished(): $Sound1.play() + +func bullet_sound(): + $Bullet.play() + +func hover_sound(): + $Hover.play() + +func click_sound(): + $Click.play() + +func type_sound(): + $Type.play() diff --git a/scenes/background_music.tscn b/scenes/background_music.tscn index 539daef..f8f1779 100644 --- a/scenes/background_music.tscn +++ b/scenes/background_music.tscn @@ -1,7 +1,11 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://sfx/sound_track_1.wav" type="AudioStream" id=1] [ext_resource path="res://scenes/background_music.gd" type="Script" id=2] +[ext_resource path="res://sfx/shoot.wav" type="AudioStream" id=3] +[ext_resource path="res://sfx/hover.wav" type="AudioStream" id=4] +[ext_resource path="res://sfx/click.wav" type="AudioStream" id=5] +[ext_resource path="res://sfx/click2.wav" type="AudioStream" id=6] [node name="Parent" type="Node"] script = ExtResource( 2 ) @@ -10,4 +14,19 @@ script = ExtResource( 2 ) stream = ExtResource( 1 ) volume_db = -13.867 autoplay = true + +[node name="Bullet" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 3 ) + +[node name="Click" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 5 ) +volume_db = -8.209 + +[node name="Hover" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 4 ) +volume_db = -27.647 + +[node name="Type" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 6 ) +volume_db = -38.389 [connection signal="finished" from="Sound1" to="." method="_on_AudioStreamPlayer_finished"] diff --git a/scenes/levels/hearts_introduce.tscn b/scenes/levels/hearts_introduce.tscn index c44f076..7983fc0 100644 --- a/scenes/levels/hearts_introduce.tscn +++ b/scenes/levels/hearts_introduce.tscn @@ -23,7 +23,7 @@ margin_left = -387.143 margin_top = -225.51 margin_right = 420.857 margin_bottom = -193.51 -text = "As you can see, you have 10 lives. Pay attention on them." +text = "As you can see, you have 10 lives. Pay attention to them." __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/levels/pixel/PixelDefender.gd b/scenes/levels/pixel/PixelDefender.gd index 3b01148..5f8d516 100644 --- a/scenes/levels/pixel/PixelDefender.gd +++ b/scenes/levels/pixel/PixelDefender.gd @@ -44,6 +44,7 @@ func _process(delta): t -= bullet_timer var b = _new_bullet(10, Bullet.ORDER) b.position = $spaceship.position + Vector2(16, 0) + BackgroundMusic.bullet_sound() for e in $Enemies.get_children(): b = _new_bullet(10, Bullet.CHAOS) b.position = e.position - Vector2(16, 0) diff --git a/scenes/levels/typeracer.gd b/scenes/levels/typeracer.gd index 173817d..429dc7a 100644 --- a/scenes/levels/typeracer.gd +++ b/scenes/levels/typeracer.gd @@ -28,6 +28,7 @@ func _process(delta): func eval(): if $Label.text.replace('\r\n', '\n').replace('\r', '\n') == $TextEdit.text.replace('\r\n', '\n').replace('\r', '\n'): $TextEdit.readonly = true + $Button.disabled = true finish_level() else: lose_heart() @@ -38,6 +39,7 @@ func eval(): func eval_corr(): if $Label.text.replace('\r\n', '\n').replace('\r', '\n') == $TextEdit.text.replace('\r\n', '\n').replace('\r', '\n'): $TextEdit.readonly = true + $Button.disabled = true finish_level() func _on_Button_on_click(): diff --git a/scenes/menu.gd b/scenes/menu.gd index 6ed7929..b2328ad 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -21,7 +21,6 @@ func _on_Outgoing_animation_finished(anim_name): func _on_Back_on_click(): - $success_sound.play(0.5) $Outgoing.play_backwards("tosettings") func _difficulty_text(): @@ -43,7 +42,6 @@ func _on_HardMode_on_click(): Settings.save() func _on_SettingsButton_on_click(): - $success_sound.play() $Outgoing.play("tosettings") diff --git a/scenes/menu.tscn b/scenes/menu.tscn index bb645a7..59c935b 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://components/Logo.tscn" type="PackedScene" id=1] [ext_resource path="res://components/button.tscn" type="PackedScene" id=2] @@ -8,7 +8,6 @@ [ext_resource path="res://textures/texts/name.png" type="Texture" id=6] [ext_resource path="res://textures/icons/light_bulb.png" type="Texture" id=7] [ext_resource path="res://textures/icons/light_bulb_r.png" type="Texture" id=8] -[ext_resource path="res://sfx/success.wav" type="AudioStream" id=9] [sub_resource type="AnimatedTexture" id=1] frames = 2 @@ -219,10 +218,6 @@ anims/startgame = SubResource( 2 ) [node name="Outgoing" type="AnimationPlayer" parent="."] anims/tointro = SubResource( 3 ) anims/tosettings = SubResource( 4 ) - -[node name="success_sound" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 9 ) - [connection signal="on_click" from="Content/Back" to="." method="_on_Back_on_click"] [connection signal="on_click" from="Content/HardMode" to="." method="_on_HardMode_on_click"] [connection signal="on_click" from="Content/Fullscreen" to="." method="_on_Fullscreen_on_click"] diff --git a/sfx/click.wav b/sfx/click.wav Binary files differnew file mode 100644 index 0000000..c586821 --- /dev/null +++ b/sfx/click.wav diff --git a/sfx/click.wav.import b/sfx/click.wav.import new file mode 100644 index 0000000..62d7331 --- /dev/null +++ b/sfx/click.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.sample" + +[deps] + +source_file="res://sfx/click.wav" +dest_files=[ "res://.import/click.wav-bcd50a54d7ddda04053b7bcc30270872.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=false +compress/mode=0 diff --git a/sfx/click2.wav b/sfx/click2.wav Binary files differnew file mode 100644 index 0000000..57b288c --- /dev/null +++ b/sfx/click2.wav diff --git a/sfx/click2.wav.import b/sfx/click2.wav.import new file mode 100644 index 0000000..64e1131 --- /dev/null +++ b/sfx/click2.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.sample" + +[deps] + +source_file="res://sfx/click2.wav" +dest_files=[ "res://.import/click2.wav-68206ce5607b79cfa09bcc65bad3ec1f.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=false +compress/mode=0 diff --git a/sfx/hover.wav b/sfx/hover.wav Binary files differnew file mode 100644 index 0000000..c59801c --- /dev/null +++ b/sfx/hover.wav diff --git a/sfx/hover.wav.import b/sfx/hover.wav.import new file mode 100644 index 0000000..d25fb34 --- /dev/null +++ b/sfx/hover.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.sample" + +[deps] + +source_file="res://sfx/hover.wav" +dest_files=[ "res://.import/hover.wav-ba46fb4ffa054b65f7f63954d7457226.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=false +compress/mode=0 diff --git a/sfx/shoot.wav b/sfx/shoot.wav Binary files differnew file mode 100644 index 0000000..6cd03a7 --- /dev/null +++ b/sfx/shoot.wav diff --git a/sfx/shoot.wav.import b/sfx/shoot.wav.import new file mode 100644 index 0000000..4c310ab --- /dev/null +++ b/sfx/shoot.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.sample" + +[deps] + +source_file="res://sfx/shoot.wav" +dest_files=[ "res://.import/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.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=false +compress/mode=0 diff --git a/sfx/yt1s.com - Button Click Sound Effects All Sounds.mp3 b/sfx/yt1s.com - Button Click Sound Effects All Sounds.mp3 Binary files differnew file mode 100644 index 0000000..d800253 --- /dev/null +++ b/sfx/yt1s.com - Button Click Sound Effects All Sounds.mp3 |