Changed to vehicle sensor instead of single sensor types
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
extends BaseWidgetNode
|
||||
class_name NetworkWidgetNode
|
||||
|
||||
var network_timer = 0.
|
||||
static var timer_1 = 1.
|
||||
|
||||
var label: Node
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
@@ -13,7 +17,12 @@ func _ready() -> void:
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
var label = get_node("Label")
|
||||
network_timer += delta
|
||||
if network_timer < timer_1:
|
||||
return
|
||||
network_timer = 0
|
||||
if label == null:
|
||||
return
|
||||
var label_text: String = ''
|
||||
for address in IP.get_local_addresses():
|
||||
label_text += address + '\n'
|
||||
|
||||
Reference in New Issue
Block a user