add player sounds

This commit is contained in:
Haze Weathers 2025-02-24 14:25:54 -05:00
parent 26deb746e7
commit 9fb4d38e05
2 changed files with 37 additions and 11 deletions

View file

@ -1,11 +1,15 @@
[gd_scene load_steps=15 format=3 uid="uid://cybm74xwbsivx"]
[gd_scene load_steps=19 format=3 uid="uid://cybm74xwbsivx"]
[ext_resource type="Texture2D" uid="uid://3i17aqnrspma" path="res://assets/textures/player/canny.png" id="1_cp4br"]
[ext_resource type="Script" path="res://objects/canny_cat.gd" id="1_twfq8"]
[ext_resource type="Texture2D" uid="uid://bqg7vd5r7w8tm" path="res://assets/textures/shadow.png" id="2_fwt6m"]
[ext_resource type="AudioStream" uid="uid://7u8a6osl4buo" path="res://assets/sounds/player/grab.ogg" id="4_hojxu"]
[ext_resource type="Script" path="res://addons/godot_state_charts/state_chart.gd" id="4_n67yk"]
[ext_resource type="Script" path="res://addons/godot_state_charts/compound_state.gd" id="5_ox6hb"]
[ext_resource type="AudioStream" uid="uid://dis5fg68ese7r" path="res://assets/sounds/player/cancel.ogg" id="5_v6u4q"]
[ext_resource type="AudioStream" uid="uid://dnyjfcq8m2r4f" path="res://assets/sounds/player/hit.ogg" id="6_a7neg"]
[ext_resource type="Script" path="res://addons/godot_state_charts/atomic_state.gd" id="6_bu01i"]
[ext_resource type="AudioStream" uid="uid://bv4plfa1oj3tf" path="res://assets/sounds/player/wall_bump.ogg" id="7_8ee3y"]
[ext_resource type="Script" path="res://addons/godot_state_charts/transition.gd" id="7_epv8h"]
[ext_resource type="Script" path="res://addons/godot_state_charts/expression_guard.gd" id="8_d5slg"]
@ -87,6 +91,24 @@ spring_length = 100.0
pixel_size = 0.0313
texture = ExtResource("2_fwt6m")
[node name="Sounds" type="Node3D" parent="."]
[node name="ChargeStart" type="AudioStreamPlayer3D" parent="Sounds"]
stream = ExtResource("4_hojxu")
bus = &"Sounds"
[node name="ChargeCancel" type="AudioStreamPlayer3D" parent="Sounds"]
stream = ExtResource("5_v6u4q")
bus = &"Sounds"
[node name="Shoot" type="AudioStreamPlayer3D" parent="Sounds"]
stream = ExtResource("6_a7neg")
bus = &"Sounds"
[node name="WallBounce" type="AudioStreamPlayer3D" parent="Sounds"]
stream = ExtResource("7_8ee3y")
bus = &"Sounds"
[node name="PowerIndicator" type="Node3D" parent="."]
visible = false
@ -157,11 +179,15 @@ delay_in_seconds = "0.0"
[node name="Winning" type="Node" parent="StateChart/Root"]
script = ExtResource("6_bu01i")
[connection signal="bounced" from="." to="Sounds/WallBounce" method="play"]
[connection signal="charge_canceled" from="." to="Sounds/ChargeCancel" method="play"]
[connection signal="shot" from="." to="Sounds/Shoot" method="play"]
[connection signal="state_physics_processing" from="StateChart/Root/Idle" to="." method="_apply_gravity"]
[connection signal="state_physics_processing" from="StateChart/Root/Moving" to="." method="_bounce_on_walls"]
[connection signal="state_physics_processing" from="StateChart/Root/Moving" to="." method="_slow_to_stop"]
[connection signal="state_physics_processing" from="StateChart/Root/Moving" to="." method="_apply_gravity"]
[connection signal="state_entered" from="StateChart/Root/Charging" to="." method="_start_charge"]
[connection signal="state_entered" from="StateChart/Root/Charging" to="Sounds/ChargeStart" method="play"]
[connection signal="state_exited" from="StateChart/Root/Charging" to="." method="_end_charge"]
[connection signal="state_physics_processing" from="StateChart/Root/Charging" to="." method="_update_charge"]
[connection signal="state_entered" from="StateChart/Root/Winning" to="." method="_start_winning"]