Added player scores to the score table.

remotes/1699310152913738325/tmp_refs/heads/legacy
unfa 2021-04-12 22:53:22 +02:00
parent b37c686602
commit 44645b404b
3 changed files with 17 additions and 5 deletions

View File

@ -5,4 +5,5 @@ var network_id
func set_player(_player):
$Nickname.text = _player.nickname
$Score.text = String(_player.player_stats.score)
network_id = _player.name

View File

@ -1,6 +1,7 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Classes/UI/PlayerListItem.gd" type="Script" id=1]
[ext_resource path="res://Classes/UI/theme.tres" type="Theme" id=2]
[node name="Player" type="HBoxContainer"]
margin_bottom = 14.0
@ -9,7 +10,18 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Score" type="Label" parent="."]
margin_right = 87.0
margin_bottom = 38.0
theme = ExtResource( 2 )
custom_colors/font_color = Color( 0.32549, 0.960784, 0.603922, 1 )
custom_constants/shadow_as_outline = 0
text = "SCORE"
[node name="Nickname" type="Label" parent="."]
margin_right = 28.0
margin_bottom = 14.0
text = "TEST"
margin_left = 91.0
margin_right = 232.0
margin_bottom = 38.0
theme = ExtResource( 2 )
text = "NICKNAME"
align = 2

View File

@ -12,4 +12,3 @@ func update_player_list():
var player_list_item = preload("res://Classes/UI/PlayerListItem.tscn").instance()
$Panel/PlayerList.add_child(player_list_item)
player_list_item.player = player