mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
35 lines
652 B
GDScript
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
|