Audio
This commit is contained in:
parent
8914d2486f
commit
83ffb3189b
13 changed files with 106 additions and 3 deletions
BIN
assets/audio/sfx/pop.mp3
Normal file
BIN
assets/audio/sfx/pop.mp3
Normal file
Binary file not shown.
19
assets/audio/sfx/pop.mp3.import
Normal file
19
assets/audio/sfx/pop.mp3.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://dp6k7xiptn68n"
|
||||
path="res://.godot/imported/pop.mp3-51a070d5fcfecbb5cfeda8302a6c6eb8.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/sfx/pop.mp3"
|
||||
dest_files=["res://.godot/imported/pop.mp3-51a070d5fcfecbb5cfeda8302a6c6eb8.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
assets/audio/sfx/slap.mp3
Normal file
BIN
assets/audio/sfx/slap.mp3
Normal file
Binary file not shown.
19
assets/audio/sfx/slap.mp3.import
Normal file
19
assets/audio/sfx/slap.mp3.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://xoy5ct1t17k5"
|
||||
path="res://.godot/imported/slap.mp3-1d1643f76cf53c654c25725ee203e7cf.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/sfx/slap.mp3"
|
||||
dest_files=["res://.godot/imported/slap.mp3-1d1643f76cf53c654c25725ee203e7cf.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
assets/audio/sfx/spikeweed_attack.mp3
Normal file
BIN
assets/audio/sfx/spikeweed_attack.mp3
Normal file
Binary file not shown.
19
assets/audio/sfx/spikeweed_attack.mp3.import
Normal file
19
assets/audio/sfx/spikeweed_attack.mp3.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://ypihbxy7tsqn"
|
||||
path="res://.godot/imported/spikeweed_attack.mp3-927978b1d538113780c1cca743c69286.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/sfx/spikeweed_attack.mp3"
|
||||
dest_files=["res://.godot/imported/spikeweed_attack.mp3-927978b1d538113780c1cca743c69286.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
9
default_bus_layout.tres
Normal file
9
default_bus_layout.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[gd_resource type="AudioBusLayout" format=3 uid="uid://igejanqt2yqf"]
|
||||
|
||||
[resource]
|
||||
bus/1/name = &"MusicBus"
|
||||
bus/1/solo = false
|
||||
bus/1/mute = false
|
||||
bus/1/bypass_fx = false
|
||||
bus/1/volume_db = 0.0
|
||||
bus/1/send = &"Master"
|
||||
Binary file not shown.
|
|
@ -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"]
|
||||
|
|
|
|||
10
scripts/components/zombies/AudioDamage.cs
Normal file
10
scripts/components/zombies/AudioDamage.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class AudioDamage : AudioStreamPlayer2D
|
||||
{
|
||||
public void OnHPChanged(int amount)
|
||||
{
|
||||
Play();
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,6 @@ public partial class RuntimeZombieData : Node2D, IEntity
|
|||
if (_hp <= 0)
|
||||
{
|
||||
QueueFree();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue