summaryrefslogtreecommitdiff
path: root/client/player/character
diff options
context:
space:
mode:
Diffstat (limited to 'client/player/character')
-rw-r--r--client/player/character/character.gd7
-rw-r--r--client/player/character/character.tscn14
2 files changed, 19 insertions, 2 deletions
diff --git a/client/player/character/character.gd b/client/player/character/character.gd
index 385481cc..11db638f 100644
--- a/client/player/character/character.gd
+++ b/client/player/character/character.gd
@@ -40,6 +40,7 @@ var current_animation := "idle"
}
@onready var step_sounds: PlayRandom = $Steps
+@onready var boost_sounds: PlayRandom = $Boosts
func _ready():
play_animation("idle")
@@ -63,7 +64,11 @@ func _process(delta):
next_animation = "idle"
walking_particles.emitting = walking
- boosting_particles.emitting = boosting and walking and not was_boosting
+ if boosting and walking and not was_boosting:
+ boosting_particles.emitting = true
+ boost_sounds.play_random()
+ else:
+ boosting_particles.emitting = false
was_boosting = boosting and walking
if current_animation != next_animation:
diff --git a/client/player/character/character.tscn b/client/player/character/character.tscn
index 106b4057..3bea6100 100644
--- a/client/player/character/character.tscn
+++ b/client/player/character/character.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=22 format=3 uid="uid://b3hhir2fvnunu"]
+[gd_scene load_steps=24 format=3 uid="uid://b3hhir2fvnunu"]
[ext_resource type="Script" path="res://player/character/character.gd" id="1_12lbh"]
[ext_resource type="ArrayMesh" uid="uid://bnmm01yjwultj" path="res://player/character/main.res" id="2_lxdbd"]
@@ -13,6 +13,8 @@
[ext_resource type="AudioStream" uid="uid://4b6ix4pkfxpj" path="res://player/sounds/step2.ogg" id="11_2dmo8"]
[ext_resource type="AudioStream" uid="uid://ywlunfulmrc6" path="res://player/sounds/step3.ogg" id="12_bj5ue"]
[ext_resource type="Script" path="res://audio/play_random.gd" id="14_3rb6x"]
+[ext_resource type="AudioStream" uid="uid://1jsqpnk3igj3" path="res://player/sounds/woosh1.ogg" id="14_ikcec"]
+[ext_resource type="AudioStream" uid="uid://cwme7eatip0jc" path="res://player/sounds/woosh2.ogg" id="15_iv4wu"]
[sub_resource type="Animation" id="Animation_tdhvg"]
length = 0.001
@@ -674,4 +676,14 @@ volume_db = -8.0
stream = ExtResource("12_bj5ue")
volume_db = -8.0
+[node name="Boosts" type="Node" parent="."]
+script = ExtResource("14_3rb6x")
+
+[node name="Woosh1" type="AudioStreamPlayer3D" parent="Boosts"]
+stream = ExtResource("14_ikcec")
+volume_db = -8.0
+
+[node name="Woosh2" type="AudioStreamPlayer3D" parent="Boosts"]
+stream = ExtResource("15_iv4wu")
+
[connection signal="animation_finished" from="HandAnimations" to="." method="_on_hand_animations_animation_finished"]