From ec0cdc7294edc54eb89bf75f01ecaa007531dccc Mon Sep 17 00:00:00 2001 From: kdx Date: Sun, 29 Oct 2023 21:27:19 +0100 Subject: original sfxs --- arrow.gd | 4 ++++ arrow.tscn | 7 ++++++- bowhit.wav | Bin 0 -> 114352 bytes bowhit.wav.import | 24 ++++++++++++++++++++++++ bowshot.wav | Bin 0 -> 76410 bytes bowshot.wav.import | 24 ++++++++++++++++++++++++ game.tscn | 6 +++++- 7 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 bowhit.wav create mode 100644 bowhit.wav.import create mode 100644 bowshot.wav create mode 100644 bowshot.wav.import diff --git a/arrow.gd b/arrow.gd index 829edd7..cd3dd78 100644 --- a/arrow.gd +++ b/arrow.gd @@ -2,6 +2,9 @@ extends Area2D var velocity: Vector2 +func _ready() -> void: + $ShotSound.play() + func type() -> String: return "arrow" @@ -9,6 +12,7 @@ func type() -> String: return "arrow" func damage(other: Area2D) -> void: other.damage(1) queue_free() + get_node("../BowHit").play() func _physics_process(_delta: float) -> void: position += velocity diff --git a/arrow.tscn b/arrow.tscn index 16b4cd9..4b78cdb 100644 --- a/arrow.tscn +++ b/arrow.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=6 format=3 uid="uid://dwmf4eu5xn0bc"] +[gd_scene load_steps=7 format=3 uid="uid://dwmf4eu5xn0bc"] [ext_resource type="Texture2D" uid="uid://dmksn3gk0ixjr" path="res://arrow.png" id="1_cagmk"] [ext_resource type="Script" path="res://arrow.gd" id="1_cg6vj"] [ext_resource type="Shader" path="res://arrow.gdshader" id="1_p0a20"] +[ext_resource type="AudioStream" uid="uid://bi6rnsdwfyax5" path="res://bowshot.wav" id="4_kpay4"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_tt0m2"] shader = ExtResource("1_p0a20") @@ -21,3 +22,7 @@ texture = ExtResource("1_cagmk") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2(27, 0) shape = SubResource("RectangleShape2D_j0cyp") + +[node name="ShotSound" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("4_kpay4") +volume_db = 5.0 diff --git a/bowhit.wav b/bowhit.wav new file mode 100644 index 0000000..8d20176 Binary files /dev/null and b/bowhit.wav differ diff --git a/bowhit.wav.import b/bowhit.wav.import new file mode 100644 index 0000000..3477cba --- /dev/null +++ b/bowhit.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://dqtjjgshbqn5j" +path="res://.godot/imported/bowhit.wav-0375e7ca9719edf2523346bc9cfb6368.sample" + +[deps] + +source_file="res://bowhit.wav" +dest_files=["res://.godot/imported/bowhit.wav-0375e7ca9719edf2523346bc9cfb6368.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/bowshot.wav b/bowshot.wav new file mode 100644 index 0000000..0ef37a4 Binary files /dev/null and b/bowshot.wav differ diff --git a/bowshot.wav.import b/bowshot.wav.import new file mode 100644 index 0000000..5d5b46e --- /dev/null +++ b/bowshot.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bi6rnsdwfyax5" +path="res://.godot/imported/bowshot.wav-67093ed32b33c612fd9a715d6da25960.sample" + +[deps] + +source_file="res://bowshot.wav" +dest_files=["res://.godot/imported/bowshot.wav-67093ed32b33c612fd9a715d6da25960.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/game.tscn b/game.tscn index b0aaf26..448d938 100644 --- a/game.tscn +++ b/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=3 uid="uid://8ps5533ot84q"] +[gd_scene load_steps=11 format=3 uid="uid://8ps5533ot84q"] [ext_resource type="PackedScene" uid="uid://c2g45v321qddb" path="res://player.tscn" id="1_3q46r"] [ext_resource type="Script" path="res://game.gd" id="1_7jh2q"] @@ -7,6 +7,7 @@ [ext_resource type="PackedScene" uid="uid://4oytwe0gnp18" path="res://ui.tscn" id="2_3layq"] [ext_resource type="Script" path="res://Genshinlogo.gd" id="2_8h31p"] [ext_resource type="PackedScene" uid="uid://cns884oaxgoof" path="res://dicaprio.tscn" id="8_llto6"] +[ext_resource type="AudioStream" uid="uid://dqtjjgshbqn5j" path="res://bowhit.wav" id="9_3iyfb"] [ext_resource type="AudioStream" uid="uid://c7pa506xccdyq" path="res://ost.ogg" id="9_bhhfh"] [sub_resource type="Curve2D" id="Curve2D_txqas"] @@ -83,4 +84,7 @@ process_callback = 0 wait_time = 2.5 autostart = true +[node name="BowHit" type="AudioStreamPlayer" parent="."] +stream = ExtResource("9_3iyfb") + [connection signal="timeout" from="SpawnTimer" to="." method="_on_spawn_timer_timeout"] -- cgit v1.2.3