extends StateMachine # TODO: remove this file (its for debug only) func _ready() -> void: assert(state != null, "initial state is null") for state_node: State in find_children("*", "State"): # fixes duplicate connections (not sure why) if not state_node.finished.is_connected(_transition_to_next_state): state_node.finished.connect(_transition_to_next_state) await owner.ready state.enter("", {"round": 0, "restart": false})