FuncIt/kristofers/game/code/username_text.gd
2021-10-21 16:40:10 +03: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