Audio
This commit is contained in:
parent
8914d2486f
commit
83ffb3189b
13 changed files with 106 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=26 format=3 uid="uid://co11v3w8hbwgf"]
|
||||
[gd_scene load_steps=28 format=3 uid="uid://co11v3w8hbwgf"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwwbkybryi6k0" path="res://assets/sprites/zombie.tres" id="2_4pdxh"]
|
||||
|
|
@ -7,6 +7,8 @@
|
|||
[ext_resource type="Script" path="res://scripts/components/FlashComponent.cs" id="3_rao3m"]
|
||||
[ext_resource type="Script" path="res://scripts/components/zombies/ZombieMover.cs" id="4_u5syx"]
|
||||
[ext_resource type="Script" path="res://scripts/components/zombies/behaviours/BasicZombieBehaviour.cs" id="5_2pvkr"]
|
||||
[ext_resource type="AudioStream" uid="uid://xoy5ct1t17k5" path="res://assets/audio/sfx/slap.mp3" id="8_di4dd"]
|
||||
[ext_resource type="Script" path="res://scripts/components/zombies/AudioDamage.cs" id="9_oxd1e"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_63ls2"]
|
||||
resource_local_to_scene = true
|
||||
|
|
@ -206,6 +208,11 @@ script = ExtResource("5_2pvkr")
|
|||
|
||||
[node name="Node" type="Node" parent="."]
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("8_di4dd")
|
||||
script = ExtResource("9_oxd1e")
|
||||
|
||||
[connection signal="OnHPChanged" from="." to="CanvasGroup" method="DamageFlash"]
|
||||
[connection signal="OnHPChanged" from="." to="AudioStreamPlayer2D" method="OnHPChanged"]
|
||||
[connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"]
|
||||
[connection signal="area_exited" from="Eatbox" to="Eatbox" method="OnAreaExited"]
|
||||
|
|
|
|||
|
|
@ -115,5 +115,8 @@ script = ExtResource("7_fdkt2")
|
|||
shape = SubResource("SegmentShape2D_v570y")
|
||||
script = ExtResource("6_0812i")
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
max_polyphony = 2
|
||||
|
||||
[connection signal="area_entered" from="Eyesight" to="Eyesight" method="OnAreaEntered"]
|
||||
[connection signal="area_exited" from="Eyesight" to="Eyesight" method="OnAreaExited"]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://bdhod5c6o53ha"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://bdhod5c6o53ha"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/entities/plants/plant_template.tscn" id="1_vmbvr"]
|
||||
[ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"]
|
||||
[ext_resource type="AudioStream" uid="uid://ypihbxy7tsqn" path="res://assets/audio/sfx/spikeweed_attack.mp3" id="3_5wcts"]
|
||||
[ext_resource type="Script" path="res://scripts/components/plants/AreaAttack.cs" id="3_hqtbm"]
|
||||
[ext_resource type="Script" path="res://scripts/components/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"]
|
||||
|
||||
|
|
@ -51,6 +52,21 @@ tracks/1/keys = {
|
|||
"method": &"Attack"
|
||||
}]
|
||||
}
|
||||
tracks/2/type = "audio"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("AudioStreamPlayer2D")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("3_5wcts")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.166667)
|
||||
}
|
||||
tracks/2/use_blend = true
|
||||
|
||||
[sub_resource type="Animation" id="Animation_h2f35"]
|
||||
resource_name = "idle"
|
||||
|
|
@ -107,5 +123,7 @@ shape = SubResource("RectangleShape2D_1di76")
|
|||
script = ExtResource("3_uhpn7")
|
||||
_player = NodePath("../AnimationPlayer")
|
||||
|
||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." index="4"]
|
||||
|
||||
[connection signal="area_entered" from="Hitbox" to="Behaviour" method="OnHitboxEntered"]
|
||||
[connection signal="area_exited" from="Hitbox" to="Behaviour" method="OnHitboxExited"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue