diff options
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/background_music.gd | 12 | ||||
-rw-r--r-- | scenes/background_music.tscn | 21 | ||||
-rw-r--r-- | scenes/levels/hearts_introduce.tscn | 2 | ||||
-rw-r--r-- | scenes/levels/pixel/PixelDefender.gd | 1 | ||||
-rw-r--r-- | scenes/levels/typeracer.gd | 2 | ||||
-rw-r--r-- | scenes/menu.gd | 2 | ||||
-rw-r--r-- | scenes/menu.tscn | 7 |
7 files changed, 37 insertions, 10 deletions
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"] |