mirror of
https://github.com/Steffo99/nanogolf.git
synced 2024-11-24 17:14:19 +00:00
27 lines
540 B
GDScript3
27 lines
540 B
GDScript3
|
extends RichTextLabel
|
||
|
class_name ScoreLabel
|
||
|
|
||
|
|
||
|
func set_partial(value: int):
|
||
|
if value == -1:
|
||
|
text = "[code][right]-[/right][/code]"
|
||
|
else:
|
||
|
text = "[code][right]%s[/right][/code]" % value
|
||
|
|
||
|
func set_total(value: int):
|
||
|
if value == -1:
|
||
|
text = "[code][right]-[/right][/code]"
|
||
|
else:
|
||
|
text = "[code][right][b]%s[/b][/right][/code]" % value
|
||
|
|
||
|
func set_player_color(value: Color):
|
||
|
modulate.r = value.r
|
||
|
modulate.g = value.g
|
||
|
modulate.b = value.b
|
||
|
|
||
|
func set_possessed(value: int):
|
||
|
if value == 1:
|
||
|
modulate.a = 0.3
|
||
|
else:
|
||
|
modulate.a = 1.0
|