des bruits de pas

tralala
This commit is contained in:
Thomas
2025-03-31 17:24:16 +02:00
parent b091bb96db
commit 6517dd744e
16 changed files with 102 additions and 39 deletions

View File

@@ -29,7 +29,10 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
$AudioStreamPlayer2D.pitch_scale = current_speed / speed
var pitch = current_speed / speed
if is_zero_approx(pitch):
pitch = 0.01
$AudioStreamPlayer2D.pitch_scale = pitch
$ZIndexControler/ShapeCast2D.enabled = !$CollisionHorizontal.disabled
var accelerationStep = (speed * delta / timeToChangeVelocity)

View File

@@ -563,7 +563,6 @@ debugLabel = NodePath("Label")
texture = ExtResource("4_0kman")
hframes = 12
vframes = 4
frame = 46
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
root_node = NodePath("../..")
@@ -589,7 +588,6 @@ shape = SubResource("CapsuleShape2D_l8rwt")
position = Vector2(1, 2)
rotation = -3.14159
shape = SubResource("CapsuleShape2D_l8rwt")
disabled = true
[node name="Label" type="Label" parent="."]
offset_left = 72.0
@@ -606,8 +604,9 @@ target_position = Vector2(1, -32)
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("4_o8ske")
volume_db = -20.8
volume_db = -15.359
autoplay = true
attenuation = 2.0
playback_type = 1
[connection signal="finished" from="AudioStreamPlayer2D" to="." method="_on_audio_stream_player_2d_finished"]