extends Spatial export(NodePath) var animatorPath var animator func _ready(): get_parent().call_deferred("SetModel", self) animator = get_node(animatorPath) animator.play(name + "Idle") func setAnimation(state): animator.play(name + state)