started adding player hand creation

This commit is contained in:
2025-07-08 17:40:13 +02:00
parent e0693725ea
commit 898c0d21ea
6 changed files with 71 additions and 10 deletions
+16 -10
View File
@@ -1,8 +1,9 @@
[gd_scene load_steps=8 format=3 uid="uid://gqrdpjslr4np"]
[gd_scene load_steps=9 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="Script" uid="uid://bipfa366flrfa" path="res://environment_manager.gd" id="4_7jktm"]
[ext_resource type="PackedScene" uid="uid://jlovgr2iojrg" path="res://elements/player_hand.tscn" id="4_fc0e3"]
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
@@ -181,31 +182,35 @@ grow_vertical = 0
disabled = true
text = "Play Card"
[node name="Node3D" type="Node3D" parent="."]
[node name="EnvironmentManager" type="Node3D" parent="." node_paths=PackedStringArray("own_player_hand")]
script = ExtResource("4_7jktm")
own_player_hand = NodePath("PlayerHand")
player_hand_scene = ExtResource("4_fc0e3")
[node name="Camera3D" type="Camera3D" parent="Node3D"]
[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="Node3D"]
[node name="Label3D" type="Label3D" parent="EnvironmentManager"]
billboard = 1
text = "Magician Online!"
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Node3D"]
[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)
[node name="WorldEnvironment" type="WorldEnvironment" parent="Node3D"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="EnvironmentManager"]
environment = SubResource("Environment_fc0e3")
[node name="PlayerHand" parent="Node3D" instance=ExtResource("4_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="Node3D"]
[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"]
[connection signal="client_left_lobby" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_client_left_lobby"]
[connection signal="client_order_received" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_client_order_received"]
[connection signal="connected_to_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_connected_to_lobby"]
[connection signal="connected_to_server" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_connected_to_server"]
[connection signal="connection_error_occurred" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_connection_error_occurred"]
@@ -213,6 +218,7 @@ mesh = SubResource("BoxMesh_fc0e3")
[connection signal="disconnected_from_lobby" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_disconnected_from_lobby"]
[connection signal="disconnected_from_server" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_disconnected_from_server"]
[connection signal="received_chat_message" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_received_chat_message"]
[connection signal="received_client_id" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_client_id"]
[connection signal="received_connection_message" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_received_connection_message"]
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/ConnectButton" to="HBoxContainer/ClientInterface" method="_on_connect_button_pressed"]
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/CreateLobbyButton" to="HBoxContainer/ClientInterface" method="_on_create_lobby_button_pressed"]
@@ -222,5 +228,5 @@ mesh = SubResource("BoxMesh_fc0e3")
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/LeaveLobbyButton" to="HBoxContainer/ClientInterface" method="_on_disconnect_lobby_button_pressed"]
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ChatContainer/SendMessageButton" to="HBoxContainer/ClientInterface" method="_on_send_message_button_pressed"]
[connection signal="pressed" from="HBoxContainer/GameUI/StartGameButton" to="HBoxContainer/GameUI" method="_on_start_game_button_pressed"]
[connection signal="pressed" from="HBoxContainer/GameUI/PlayCardButton" to="Node3D/PlayerHand" method="_on_play_card_button_pressed"]
[connection signal="card_selected" from="Node3D/PlayerHand" to="HBoxContainer/GameUI" method="_on_player_hand_card_selected"]
[connection signal="pressed" from="HBoxContainer/GameUI/PlayCardButton" to="EnvironmentManager/PlayerHand" method="_on_play_card_button_pressed"]
[connection signal="card_selected" from="EnvironmentManager/PlayerHand" to="HBoxContainer/GameUI" method="_on_player_hand_card_selected"]