miggor-StreamGraph/classes/deck/nodes/print.gd

28 lines
453 B
GDScript3
Raw Normal View History

extends DeckNode
func _init() -> void:
add_input_port(
Deck.Types.STRING,
2023-06-10 20:23:57 +02:00
"Text to print",
"field"
)
2023-06-10 20:23:57 +02:00
add_input_port(
Deck.Types.BOOL,
"Trigger",
"button"
)
name = "Print"
2023-06-10 20:23:57 +02:00
func _receive(to_port: int, data: DeckType, extra_data: Array = []) -> void:
if to_port != 1:
return
2023-06-11 17:39:26 +02:00
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)