1
Fork 0
mirror of https://github.com/Steffo99/nanogolf.git synced 2024-11-25 17:44:18 +00:00
algodist-steffo-nanogolf/scenes/player_label.gd

9 lines
238 B
GDScript3
Raw Normal View History

2024-02-28 05:30:45 +00:00
extends Label
class_name PlayerLabel
func update_from_tracker(tracker: SinglePlayerTracker):
text = tracker.player_name
add_theme_color_override("font_color", tracker.player_color)
modulate.a = 1.0 if tracker.peer_connected else 0.3