Un peu de musique dans ce monde de brutes

This commit is contained in:
Thomas
2025-03-31 13:13:07 +02:00
parent a82237ff28
commit b091bb96db
46 changed files with 702 additions and 6 deletions

View File

@@ -23,9 +23,13 @@ func moveTo(position: Vector2) -> void:
func updateFacingDirectionInAnimationTree():
animation_tree.set("parameters/CarStates/driving/blend_position", last_facing_direction)
animation_tree.set("parameters/CarStates/idling/blend_position", last_facing_direction)
func _ready() -> void:
$AudioStreamPlayer2D.play()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
$AudioStreamPlayer2D.pitch_scale = current_speed / speed
$ZIndexControler/ShapeCast2D.enabled = !$CollisionHorizontal.disabled
var accelerationStep = (speed * delta / timeToChangeVelocity)