1 2 3 4 5 6 7 8 9 10 11 12 13
class_name State extends Node func _state_enter(): pass func _state_exit(): pass func set_state(state: NodePath): get_parent().set_state(state)