mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 06:45:33 +00:00
Hurt sound
This commit is contained in:
parent
c6aad99d79
commit
b91e7dbf70
11 changed files with 100 additions and 22 deletions
|
|
@ -1,8 +1,7 @@
|
|||
[gd_resource type="Resource" script_class="WeaponResource" load_steps=5 format=3 uid="uid://do0jwf5jhx1i5"]
|
||||
[gd_resource type="Resource" script_class="WeaponResource" load_steps=4 format=3 uid="uid://do0jwf5jhx1i5"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://sjrqf5xg6fek" path="res://Resources/Bullets/player_laser.tres" id="1_1h0tt"]
|
||||
[ext_resource type="AudioStream" uid="uid://jsv3yjluv1au" path="res://SFX/Weapons/Reload_01.wav" id="2_h0bjj"]
|
||||
[ext_resource type="AudioStream" uid="uid://cjg8r7bthkfsy" path="res://SFX/Laser_shoot 11.wav" id="3_iquwk"]
|
||||
[ext_resource type="AudioStream" uid="uid://c1au3v0mynil8" path="res://SFX/Weapons/Laser_shoot 7.wav" id="2_gfnbi"]
|
||||
[ext_resource type="Script" uid="uid://b6fmrnipv88bk" path="res://Scripts/Resources/WeaponResource.cs" id="4_70v4a"]
|
||||
|
||||
[resource]
|
||||
|
|
@ -22,5 +21,4 @@ BulletsPerShot = 1
|
|||
SpreadAngle = 5.0
|
||||
RandomSpread = 2.5
|
||||
_rotationOffset = 0.0
|
||||
ReloadSound = ExtResource("2_h0bjj")
|
||||
ShootSound = ExtResource("3_iquwk")
|
||||
ShootSound = ExtResource("2_gfnbi")
|
||||
|
|
|
|||
BIN
SFX/Chiptone_Source/Cirno_Hurt.cpt
Normal file
BIN
SFX/Chiptone_Source/Cirno_Hurt.cpt
Normal file
Binary file not shown.
BIN
SFX/Chiptone_Source/Cirno_Hurt.wav
(Stored with Git LFS)
Normal file
BIN
SFX/Chiptone_Source/Cirno_Hurt.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
24
SFX/Chiptone_Source/Cirno_Hurt.wav.import
Normal file
24
SFX/Chiptone_Source/Cirno_Hurt.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dgp2e6cqb7i2q"
|
||||
path="res://.godot/imported/Cirno_Hurt.wav-790672f3a06b71600e6453974741c62d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://SFX/Chiptone_Source/Cirno_Hurt.wav"
|
||||
dest_files=["res://.godot/imported/Cirno_Hurt.wav-790672f3a06b71600e6453974741c62d.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=2
|
||||
BIN
SFX/Weapons/Laser_shoot 7.wav
(Stored with Git LFS)
Normal file
BIN
SFX/Weapons/Laser_shoot 7.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
24
SFX/Weapons/Laser_shoot 7.wav.import
Normal file
24
SFX/Weapons/Laser_shoot 7.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c1au3v0mynil8"
|
||||
path="res://.godot/imported/Laser_shoot 7.wav-db70b63b7f46a2f1cac2e33d65e1be76.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://SFX/Weapons/Laser_shoot 7.wav"
|
||||
dest_files=["res://.godot/imported/Laser_shoot 7.wav-db70b63b7f46a2f1cac2e33d65e1be76.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=2
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=89 format=3 uid="uid://c4pr2707hbeph"]
|
||||
[gd_scene load_steps=91 format=3 uid="uid://c4pr2707hbeph"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d2ubk5gucny6s" path="res://Scripts/Components/FSM/PlayerFSMProxy.cs" id="1_g3wua"]
|
||||
[ext_resource type="Script" uid="uid://bw2hakslndaxm" path="res://Scripts/Components/FSM/PlayerStateMachine.cs" id="1_mpmil"]
|
||||
|
|
@ -46,6 +46,8 @@
|
|||
[ext_resource type="Script" uid="uid://d2r5eh3wn16bg" path="res://Scripts/Components/FSM/Player/PlayerGrazingModule.cs" id="42_awrib"]
|
||||
[ext_resource type="Script" uid="uid://ru6yajru35t0" path="res://Scripts/Components/FSM/Player/FreezeModule.cs" id="43_nfq4p"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckfhlsboy6mfr" path="res://Scenes/Weapons/Bullets/Ice.tscn" id="44_m1iep"]
|
||||
[ext_resource type="AudioStream" uid="uid://dgp2e6cqb7i2q" path="res://SFX/Chiptone_Source/Cirno_Hurt.wav" id="47_fmswe"]
|
||||
[ext_resource type="Script" uid="uid://c1cjjk0ghptyx" path="res://Scripts/Components/FSM/Player/HurtSoundPlayer.cs" id="48_3rkrn"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_b3hxm"]
|
||||
radius = 5.0
|
||||
|
|
@ -605,6 +607,11 @@ IceScene = ExtResource("44_m1iep")
|
|||
Shield = NodePath("../DamageReceiver/ShieldProvider")
|
||||
InputProvider = NodePath("../InputProvider")
|
||||
|
||||
[node name="HurtPlayer" type="AudioStreamPlayer2D" parent="." node_paths=PackedStringArray("DamageReceiver")]
|
||||
stream = ExtResource("47_fmswe")
|
||||
script = ExtResource("48_3rkrn")
|
||||
DamageReceiver = NodePath("../DamageReceiver")
|
||||
|
||||
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]
|
||||
[connection signal="area_entered" from="InteractionProvider" to="InteractionProvider" method="_on_interaction_controller_area_entered"]
|
||||
[connection signal="area_exited" from="InteractionProvider" to="InteractionProvider" method="_on_interaction_controller_area_exited"]
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ Script = ExtResource("35_imrxd")
|
|||
InvertSignal = true
|
||||
|
||||
[node name="Fairy" parent="Tilemaps/Actors" instance=ExtResource("37_sb7g3")]
|
||||
position = Vector2(159, 349)
|
||||
position = Vector2(83, 342)
|
||||
|
||||
[node name="Fairy2" parent="Tilemaps/Actors" instance=ExtResource("37_sb7g3")]
|
||||
position = Vector2(-103, 505)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=169 format=4 uid="uid://bv451a8wgty4u"]
|
||||
[gd_scene load_steps=168 format=4 uid="uid://bv451a8wgty4u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ksslq"]
|
||||
|
|
@ -49,7 +49,6 @@
|
|||
[ext_resource type="PackedScene" uid="uid://cmr6fclttrpkb" path="res://Scenes/Items/Ammo1.tscn" id="34_17pjh"]
|
||||
[ext_resource type="PackedScene" uid="uid://byjq8xpx4crfd" path="res://Scenes/Interactable/control_pad_blue_keycard.tscn" id="35_gdbcj"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0yes7huiyisw" path="res://Scenes/Items/Blue_Keycard.tscn" id="35_rblsn"]
|
||||
[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="36_7lma1"]
|
||||
[ext_resource type="PackedScene" uid="uid://r25rq6ijgm6m" path="res://Scenes/Items/Green_Keycard.tscn" id="36_f8fh1"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnbtou2fklyvp" path="res://Scenes/Actors/alarm_sign.tscn" id="36_rd6f6"]
|
||||
[ext_resource type="PackedScene" uid="uid://dsbk2l40er2da" path="res://Scenes/Props/Box_Blue.tscn" id="37_gtga7"]
|
||||
|
|
@ -300,7 +299,7 @@ ActivationType = 0
|
|||
Targets = Array[NodePath]([NodePath("../Rumia")])
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7lma1"]
|
||||
[sub_resource type="Resource" id="Resource_ldb17"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("49_0si7g")
|
||||
Target = NodePath(".")
|
||||
|
|
@ -691,7 +690,7 @@ position = Vector2(-1832, -99)
|
|||
|
||||
[node name="Chest2" parent="Parallax2D/Factory Tilemaps/Debug Room" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-679, -408)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("76_dskij"), ExtResource("77_wma5c"), ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("77_wma5c"), ExtResource("77_wma5c"), ExtResource("77_wma5c"), ExtResource("77_wma5c"), ExtResource("76_dskij")])
|
||||
LootTable = [ExtResource("76_dskij"), ExtResource("77_wma5c"), ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("94_gd7x4"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("6_khabp"), ExtResource("77_wma5c"), ExtResource("77_wma5c"), ExtResource("77_wma5c"), ExtResource("77_wma5c"), ExtResource("76_dskij")]
|
||||
|
||||
[node name="Valve" parent="Parallax2D/Factory Tilemaps/Debug Room" node_paths=PackedStringArray("Target") instance=ExtResource("48_8usll")]
|
||||
position = Vector2(-666, -545)
|
||||
|
|
@ -997,7 +996,7 @@ position = Vector2(-1488, -544)
|
|||
|
||||
[node name="Chest" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-920, -424)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("27_y1lom"), ExtResource("28_u0dff"), ExtResource("29_wb5l5"), ExtResource("30_0d2o6"), ExtResource("5_nqier")])
|
||||
LootTable = [ExtResource("27_y1lom"), ExtResource("28_u0dff"), ExtResource("29_wb5l5"), ExtResource("30_0d2o6"), ExtResource("5_nqier")]
|
||||
|
||||
[node name="RedKeycard_Switch_2" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Target") instance=ExtResource("17_e3v0b")]
|
||||
position = Vector2(-1095, 132)
|
||||
|
|
@ -1247,7 +1246,7 @@ Events = Array[ExtResource("62_w8skm")]([SubResource("Resource_068l7"), SubResou
|
|||
|
||||
[node name="BossBattleStartScript" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")]
|
||||
position = Vector2(-1487, -396)
|
||||
Events = Array[ExtResource("62_w8skm")]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_7lma1")])
|
||||
Events = Array[ExtResource("62_w8skm")]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_ldb17")])
|
||||
|
||||
[node name="Enemy13" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("47_u1ve6")]
|
||||
position = Vector2(-1657, -788)
|
||||
|
|
@ -1379,7 +1378,7 @@ position = Vector2(-2000, -736)
|
|||
[node name="ControlPad8" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("12_hfkf1")]
|
||||
position = Vector2(-2027, -735)
|
||||
Targets = [NodePath("../HorizontalForceField")]
|
||||
Requirements = Array[ExtResource("36_7lma1")]([ExtResource("84_ma1ta")])
|
||||
Requirements = [ExtResource("84_ma1ta")]
|
||||
|
||||
[node name="Ammo6" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-872, -220)
|
||||
|
|
@ -1439,35 +1438,35 @@ position = Vector2(-1624, -813)
|
|||
|
||||
[node name="Chest3" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-376, 54)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")]
|
||||
|
||||
[node name="Chest5" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-1048, -139)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g"), ExtResource("4_swym2")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g"), ExtResource("4_swym2")]
|
||||
|
||||
[node name="Chest6" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-2104, -362)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g"), ExtResource("4_swym2")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g"), ExtResource("4_swym2")]
|
||||
|
||||
[node name="Chest4" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-823, 67)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")]
|
||||
|
||||
[node name="Chest7" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-1417, 326)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")]
|
||||
|
||||
[node name="Chest10" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-1515, 408)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")]
|
||||
|
||||
[node name="Chest8" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-1544, 552)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")]
|
||||
|
||||
[node name="Chest9" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("25_4b2ed")]
|
||||
position = Vector2(-1384, 231)
|
||||
LootTable = Array[ExtResource("36_7lma1")]([ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")])
|
||||
LootTable = [ExtResource("6_khabp"), ExtResource("94_gd7x4"), ExtResource("95_srv0g")]
|
||||
|
||||
[node name="Ammo13" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("34_17pjh")]
|
||||
position = Vector2(-392, 52)
|
||||
|
|
|
|||
19
Scripts/Components/FSM/Player/HurtSoundPlayer.cs
Normal file
19
Scripts/Components/FSM/Player/HurtSoundPlayer.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using Cirno.Scripts.Components.Actors;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM.Player;
|
||||
|
||||
public partial class HurtSoundPlayer : AudioStreamPlayer2D
|
||||
{
|
||||
[Export] public PlayerDamageReceiver DamageReceiver { get; private set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
DamageReceiver.HealthDecreased += OnHurt;
|
||||
}
|
||||
|
||||
private void OnHurt(float value, float newValue, float maxValue)
|
||||
{
|
||||
this.Play();
|
||||
}
|
||||
}
|
||||
1
Scripts/Components/FSM/Player/HurtSoundPlayer.cs.uid
Normal file
1
Scripts/Components/FSM/Player/HurtSoundPlayer.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c1cjjk0ghptyx
|
||||
Loading…
Add table
Add a link
Reference in a new issue