1
Fork 0
mirror of https://github.com/Steffo99/nanogolf.git synced 2024-11-21 23:54:21 +00:00
algodist-steffo-nanogolf/scenes/player_score_label.gd

9 lines
271 B
GDScript3
Raw Normal View History

2024-03-16 04:25:23 +00:00
extends Label
class_name PlayerScoreLabel
func from_score(strokes: int, playernode: PlayerNode) -> void:
text = "%s - %d" % [playernode.player_name, strokes]
modulate = playernode.player_color
modulate.a = 0.3 if playernode.get_multiplayer_authority() == 1 else 1.0