1
Fork 0
mirror of https://github.com/Steffo99/nanogolf.git synced 2024-11-24 17:14:19 +00:00
algodist-steffo-nanogolf/scenes/player_score_label.gd
2024-03-16 05:25:23 +01:00

8 lines
271 B
GDScript

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