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

@@ -12,6 +12,7 @@ var humanInteractionTarget: Human = null
@onready var animation_player := $AnimationPlayer
@onready var state_machine := animation_tree.get("parameters/HumanState/playback") as AnimationNodeStateMachinePlayback
@onready var interactionZone : InteractionZone = $"interaction zone"
@onready var feetSound = $FeetSound
var interactionClueFor : Human
var interactionPaused= false
@@ -64,6 +65,9 @@ func _physics_process(delta):
# compute the direction the player wants to look at
if velocity:
last_facing_direction = velocity.normalized()
feetSound.stream_paused = false
else:
feetSound.stream_paused = true
updateFacingDirectionInAnimationTree()
@@ -109,3 +113,5 @@ func disable_interaction_clue():
func _on_load_from_game_state() -> void:
emit_signal("loadFromGameState")
feetSound.play()
feetSound.stream_paused = true