added winning determination algorithm (not entirely working yet)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://gqrdpjslr4np"]
|
||||
[gd_scene load_steps=10 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"]
|
||||
[ext_resource type="PackedScene" uid="uid://b55xpcxk7g5ph" path="res://cards/playing_card.tscn" id="6_eow3j"]
|
||||
[ext_resource type="PackedScene" uid="uid://dj1wye7o27vil" path="res://assets/table.glb" id="7_eow3j"]
|
||||
|
||||
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
|
||||
@@ -183,6 +184,7 @@ disabled = true
|
||||
text = "Play Card"
|
||||
|
||||
[node name="BetContainer" type="VBoxContainer" parent="HBoxContainer/GameUI"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
@@ -200,14 +202,43 @@ layout_mode = 2
|
||||
layout_mode = 2
|
||||
text = "submit bet"
|
||||
|
||||
[node name="EnvironmentManager" type="Node3D" parent="." node_paths=PackedStringArray("own_player_hand", "hand_markers_3", "hand_markers_4", "hand_markers_5", "hand_markers_6")]
|
||||
[node name="Label" type="Label" parent="HBoxContainer/GameUI"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -88.0
|
||||
offset_top = 300.0
|
||||
offset_right = 88.0
|
||||
offset_bottom = 323.0
|
||||
grow_horizontal = 2
|
||||
text = "it's your turn DUMMY!!"
|
||||
|
||||
[node name="WinLabel" type="Label" parent="HBoxContainer/GameUI"]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = 350.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 373.0
|
||||
grow_horizontal = 2
|
||||
text = "YOU WON!!!!!!"
|
||||
|
||||
[node name="EnvironmentManager" type="Node3D" parent="." node_paths=PackedStringArray("web_client", "trump_container", "own_player_hand", "hand_markers_3", "hand_markers_4", "hand_markers_5", "hand_markers_6")]
|
||||
script = ExtResource("4_7jktm")
|
||||
web_client = NodePath("../WebClientTCP")
|
||||
trump_container = NodePath("TrumpPosition")
|
||||
own_player_hand = NodePath("PlayerHand0")
|
||||
hand_markers_3 = [NodePath("HandMarker1"), NodePath("HandMarker2")]
|
||||
hand_markers_4 = [NodePath("HandMarker1"), NodePath("HandMarker3"), NodePath("HandMarker2")]
|
||||
hand_markers_5 = [NodePath("HandMarker4"), NodePath("HandMarker1"), NodePath("HandMarker3"), NodePath("HandMarker2")]
|
||||
hand_markers_6 = [NodePath("HandMarker4"), NodePath("HandMarker1"), NodePath("HandMarker3"), NodePath("HandMarker2"), NodePath("HandMarker5")]
|
||||
player_hand_scene = ExtResource("4_fc0e3")
|
||||
card_scene = ExtResource("6_eow3j")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="EnvironmentManager"]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.992546, 0.121869, 0, -0.121869, 0.992546, 0, 1.128, 3.933)
|
||||
@@ -239,6 +270,9 @@ transform = Transform3D(-0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, -0.5, 3.2, 0.4
|
||||
|
||||
[node name="Table" parent="EnvironmentManager" instance=ExtResource("7_eow3j")]
|
||||
|
||||
[node name="TrumpPosition" type="Marker3D" parent="EnvironmentManager"]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0.167186, 0)
|
||||
|
||||
[connection signal="cards_received" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_cards_received"]
|
||||
[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"]
|
||||
@@ -251,11 +285,16 @@ transform = Transform3D(-0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, -0.5, 3.2, 0.4
|
||||
[connection signal="connection_status_changed" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_connection_status_changed"]
|
||||
[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="notify_play_card_request" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_notify_play_card_request"]
|
||||
[connection signal="received_bet_request" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_received_bet_request"]
|
||||
[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="received_play_winner_request" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_play_winner_request"]
|
||||
[connection signal="received_played_card" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_played_card"]
|
||||
[connection signal="received_win" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_received_win"]
|
||||
[connection signal="request_next_round" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_request_next_round"]
|
||||
[connection signal="trump_received" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_trump_received"]
|
||||
[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"]
|
||||
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/CreateLobbyButton" to="HBoxContainer/GameUI" method="_on_create_lobby_button_pressed"]
|
||||
@@ -266,4 +305,5 @@ transform = Transform3D(-0.5, 0, 0.866025, 0, 1, 0, -0.866025, 0, -0.5, 3.2, 0.4
|
||||
[connection signal="pressed" from="HBoxContainer/GameUI/StartGameButton" to="HBoxContainer/GameUI" method="_on_start_game_button_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/GameUI/PlayCardButton" to="EnvironmentManager/PlayerHand0" method="_on_play_card_button_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/GameUI/BetContainer/SubmitBetButton" to="HBoxContainer/GameUI" method="_on_submit_bet_button_pressed"]
|
||||
[connection signal="card_played" from="EnvironmentManager/PlayerHand0" to="HBoxContainer/GameUI" method="_on_player_hand_0_card_played"]
|
||||
[connection signal="card_selected" from="EnvironmentManager/PlayerHand0" to="HBoxContainer/GameUI" method="_on_player_hand_card_selected"]
|
||||
|
||||
Reference in New Issue
Block a user