miggor-StreamGraph/classes/deck/port.gd
2023-07-21 11:26:43 +03:00

35 lines
652 B
GDScript

class_name Port
var type: Deck.Types
var label: String
var descriptor: String
var value_callback: Callable
var port_type: DeckNode.PortType
var index_of_type: int
var index: int
var value: Variant: set = set_value
func _init(
p_type: Deck.Types,
p_label: String,
p_index: int,
p_port_type: DeckNode.PortType,
p_index_of_type: int,
p_descriptor: String = "",
# p_value_callback: Callable = Callable(),
) -> void:
type = p_type
label = p_label
descriptor = p_descriptor
# value_callback = p_value_callback
port_type = p_port_type
index_of_type = p_index_of_type
index = p_index
func set_value(v: Variant) -> void:
value = v