Work on pickups and multiplayer

This commit is contained in:
2026-03-19 23:50:29 -04:00
parent d128501f7c
commit 9d931a3b46
42 changed files with 771 additions and 324 deletions

View File

@@ -48,6 +48,21 @@ func _on_struggle_changed(value : float) -> void:
else:
struggle_bar.value = value
func set_animation_length(node_name : String, length : float) -> void:
if length == 0:
length = 0.01
var blendtree : AnimationNodeBlendTree = anim_tree.tree_root.get_node(node_name)
if !blendtree:
return
var anim_node : AnimationNodeAnimation = blendtree.get_node("Animation")
if !anim_node:
return
var animation : Animation = anim_player.get_animation(anim_node.animation)
if !animation:
return
var a_scale : float = animation.length / length
anim_tree["parameters/%s/TimeScale/scale" % node_name] = a_scale
func _on_footstep_timer_timeout() -> void:
walk_sound.play()