diff --git a/classes/deck/nodes/print.gd b/classes/deck/nodes/print.gd index 208b4a0..3ae7733 100644 --- a/classes/deck/nodes/print.gd +++ b/classes/deck/nodes/print.gd @@ -21,7 +21,7 @@ func _receive(to_port: int, data: DeckType, extra_data: Array = []) -> void: if to_port != 1: return -# var data_to_print = data.get_value() - var data_to_print = input_ports[0].value_callback.call() + var data_to_print = data.get_value() +# var data_to_print = input_ports[0].value_callback.call() print(data_to_print) print("extra data: ", extra_data) diff --git a/test.gd b/test.gd index e67e833..6d89590 100644 --- a/test.gd +++ b/test.gd @@ -13,6 +13,8 @@ var print_node = preload("res://classes/deck/nodes/print.gd") func _ready() -> void: + var a = [1, 2, 3] + var b = [2, 1, 3] add_button_button.pressed.connect( func(): var node := deck.add_node(button_node) @@ -30,3 +32,11 @@ func _ready() -> void: nodes_container.add_child(node_renderer) add_print_button.disabled = true ) + + connect_them_button.pressed.connect( + func(): + var node_a: DeckNode = nodes_container.get_child(0).node + var node_b: DeckNode = nodes_container.get_child(1).node + + deck.connect_nodes(node_a, node_b, 0, 1) + ) diff --git a/test_node_renderer.gd b/test_node_renderer.gd index 55ad263..f8938e3 100644 --- a/test_node_renderer.gd +++ b/test_node_renderer.gd @@ -43,6 +43,9 @@ func _ready() -> void: output_port.value_callback = port_drawer.get_text "button": port_drawer.add_button(output_port.label) + port_drawer.button_pressed.connect(func(): + node.send(i, DeckType.DeckTypeBool.new(true)) + ) _: port_drawer.add_label(output_port.label)