Chelimbalo/scripts/gui/hud/player_round_display.gd
2025-11-29 23:46:16 +05:00

18 lines
562 B
GDScript

extends Label
@export var our_side: bool
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if our_side:
match Lobby.get_team():
Session.TEAMS.DEFENCE:
text = str(Session.defender_score)
Session.TEAMS.ATTACK, Session.TEAMS.SPECTATE, Session.TEAMS.UNASSIGNED:
text = str(Session.attacker_score)
else:
match Lobby.get_team():
Session.TEAMS.DEFENCE:
text = str(Session.attacker_score)
Session.TEAMS.ATTACK, Session.TEAMS.SPECTATE, Session.TEAMS.UNASSIGNED:
text = str(Session.defender_score)