2019-11-21 23:52:54 +01:00
|
|
|
extends StaticBody
|
|
|
|
|
|
|
|
# Declare member variables here. Examples:
|
|
|
|
# var a = 2
|
|
|
|
# var b = "text"
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
2019-11-23 18:28:59 +01:00
|
|
|
var forks = get_tree().get_nodes_in_group("PipeForks")
|
|
|
|
for f in forks:
|
|
|
|
f.connect("flow_changed", self, "_update_pipe_colors")
|
|
|
|
|
|
|
|
func _update_pipe_colors():
|
|
|
|
var pipes = get_tree().get_nodes_in_group("Pipes")
|
|
|
|
for p in pipes:
|
|
|
|
p.update_content_color()
|
2019-11-21 23:52:54 +01:00
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
#func _process(delta):
|
|
|
|
# pass
|
2019-11-23 18:28:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
func _on_Fork1_flow_changed():
|
|
|
|
pass # Replace with function body.
|