class_name StrategyStack extends Node func _init() -> void: tree_entered.connect(add_action) tree_exited.connect(remove_action) func add_action() -> void: pass func remove_action() -> void: pass func process_action(jet: Jet) -> void: var action = get_child(0) if not action: return action.do(jet)