added add_cards(), which now sorts cards before drawing them to the hand

This commit is contained in:
2025-07-15 09:09:04 +02:00
parent 8dde6a813f
commit 261e958a98
3 changed files with 21 additions and 23 deletions
+1 -11
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://gqrdpjslr4np"]
[gd_scene load_steps=8 format=3 uid="uid://gqrdpjslr4np"]
[ext_resource type="Script" uid="uid://p5gvnyhjqe6o" path="res://components/web_client_tcp.gd" id="1_feb5d"]
[ext_resource type="Script" uid="uid://c0cqkatyo4uj1" path="res://components/client_interface.gd" id="2_e2o6t"]
@@ -15,9 +15,6 @@ ambient_light_source = 2
ambient_light_color = Color(1, 1, 1, 1)
ambient_light_energy = 0.15
[sub_resource type="BoxMesh" id="BoxMesh_fc0e3"]
size = Vector3(0.2, 0.2, 0.2)
[node name="Game" type="Node"]
[node name="WebClientTCP" type="Node" parent="."]
@@ -206,10 +203,6 @@ player_hand_scene = ExtResource("4_fc0e3")
[node name="Camera3D" type="Camera3D" parent="EnvironmentManager"]
transform = Transform3D(1, 0, 0, 0, 0.997882, 0.0650548, 0, -0.0650548, 0.997882, 0, 0.171315, 1.65638)
[node name="Label3D" type="Label3D" parent="EnvironmentManager"]
billboard = 1
text = "Magician Online!"
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="EnvironmentManager"]
transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0.197668, -0.572361, 0.795821, 2.41581, 2.80426, 0)
@@ -219,9 +212,6 @@ environment = SubResource("Environment_fc0e3")
[node name="PlayerHand" parent="EnvironmentManager" instance=ExtResource("4_fc0e3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.91793)
[node name="MeshInstance3D" type="MeshInstance3D" parent="EnvironmentManager"]
mesh = SubResource("BoxMesh_fc0e3")
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_client_joined_lobby"]
[connection signal="client_joined_lobby" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_client_joined_lobby"]
[connection signal="client_left_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_client_left_lobby"]