Round system

This commit is contained in:
Rendo 2025-11-29 23:46:16 +05:00
commit 3df8247a84
32 changed files with 573 additions and 123 deletions

View file

@ -0,0 +1,18 @@
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)

View file

@ -0,0 +1 @@
uid://bala54fa32e35

View file

@ -0,0 +1,8 @@
extends Label
func _process(_delta: float) -> void:
var seconds_u = int(round(Session.reference_round_time))
var seconds = seconds_u % 60
@warning_ignore("integer_division")
var minutes = seconds_u / 60
text = str(minutes)+":"+str(seconds).pad_zeros(2)

View file

@ -0,0 +1 @@
uid://bos7nftlx8tv3