FuncIt/source/assets/scripts/ui_element_handlers/username_text.gd
2021-11-08 14:11:12 +02:00

16 lines
294 B
GDScript

extends Node2D
var player_following = null
var text = "" setget text_set
onready var label = $Label
func _process(delta: float) -> void:
if player_following != null:
global_position = player_following.global_position
func text_set(new_text) -> void:
text = new_text
label.text = text