client: added player hand and animation for added cards

This commit is contained in:
2025-07-08 15:58:46 +02:00
parent 4fec323639
commit a7ea8510f7
9 changed files with 137 additions and 14 deletions
+13 -5
View File
@@ -1,9 +1,9 @@
[gd_scene load_steps=7 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"]
[ext_resource type="Script" uid="uid://utt8atbh7b2a" path="res://game_client.gd" id="3_feb5d"]
[ext_resource type="PackedScene" uid="uid://b55xpcxk7g5ph" path="res://cards/playing_card.tscn" id="4_fc0e3"]
[ext_resource type="PackedScene" uid="uid://jlovgr2iojrg" path="res://elements/player_hand.tscn" id="4_fc0e3"]
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
font_names = PackedStringArray("IBM Plex Mono")
@@ -14,6 +14,9 @@ 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="."]
@@ -23,6 +26,7 @@ script = ExtResource("1_feb5d")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -1591.0
grow_horizontal = 2
grow_vertical = 2
@@ -139,6 +143,7 @@ layout_mode = 2
text = "Send"
[node name="GameUI" type="Control" parent="HBoxContainer" node_paths=PackedStringArray("web_client", "start_game_button")]
visible = false
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("3_feb5d")
@@ -170,15 +175,18 @@ transform = Transform3D(1, 0, 0, 0, 0.997882, 0.0650548, 0, -0.0650548, 0.997882
billboard = 1
text = "Magician Online!"
[node name="PlayingCard" parent="Node3D" instance=ExtResource("4_fc0e3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.6767)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Node3D"]
transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0.197668, -0.572361, 0.795821, 2.41581, 2.80426, 0)
[node name="WorldEnvironment" type="WorldEnvironment" parent="Node3D"]
environment = SubResource("Environment_fc0e3")
[node name="PlayerHand" parent="Node3D" 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="Node3D"]
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"]