cave-of-dreams/scripts/dreamer_body.gd

20 lines
586 B
GDScript3
Raw Normal View History

extends Node3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
2026-05-16 01:51:44 +00:00
func set_inhand(weapon_name: String) -> void:
var inhand = Global.inhands[weapon_name].instantiate()
for n in $Body/ArmPivot/FrontArm/HandPoint.get_children(): n.queue_free()
$Body/ArmPivot/FrontArm/HandPoint.add_child(inhand)
inhand.position = Vector3.ZERO
inhand.rotation = Vector3.ZERO
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
$Body/FrontLeg.position.z = 2