From 9005ad2ac7e7f2b037b1b4881580ad5d33e6e9dc Mon Sep 17 00:00:00 2001 From: desktop Date: Thu, 10 Dec 2020 00:26:43 +0100 Subject: [PATCH] Added disconnect button back --- .../HerMajestyTheQueen.tscn | 10 +++--- Assets/Maps/Rotor/Material_001.material | Bin 0 -> 1812 bytes CharacterSelect.gd | 8 +++++ CharacterSelect.tscn | 34 +++++++++++++----- Game.gd | 2 ++ Game.tscn | 3 ++ 6 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 Assets/Maps/Rotor/Material_001.material diff --git a/Assets/Characters/HerMajestyTheQueen/HerMajestyTheQueen.tscn b/Assets/Characters/HerMajestyTheQueen/HerMajestyTheQueen.tscn index 56c82fc..1b722c5 100644 --- a/Assets/Characters/HerMajestyTheQueen/HerMajestyTheQueen.tscn +++ b/Assets/Characters/HerMajestyTheQueen/HerMajestyTheQueen.tscn @@ -22,17 +22,17 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.27203, 0 ) transform = Transform( 1, 0, 0, 0, -1.62921e-07, 1, 0, -1, -1.62921e-07, 0, 1.5, 0 ) shape = SubResource( 1 ) -[node name="Throne" parent="." index="7" instance=ExtResource( 3 )] +[node name="Throne" parent="." index="6" instance=ExtResource( 3 )] transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 0.989432, 0 ) -[node name="FrontLeft" parent="." index="8" instance=ExtResource( 4 )] +[node name="FrontLeft" parent="." index="7" instance=ExtResource( 4 )] transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0.918807, 0, -0.312819 ) -[node name="FrontRight" parent="." index="9" instance=ExtResource( 4 )] +[node name="FrontRight" parent="." index="8" instance=ExtResource( 4 )] transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, -0.919, 0, -0.313 ) -[node name="BackLeft" parent="." index="10" instance=ExtResource( 4 )] +[node name="BackLeft" parent="." index="9" instance=ExtResource( 4 )] transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0.918807, 0, 0.7619 ) -[node name="BackRight" parent="." index="11" instance=ExtResource( 4 )] +[node name="BackRight" parent="." index="10" instance=ExtResource( 4 )] transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, -0.919, 0, 0.761719 ) diff --git a/Assets/Maps/Rotor/Material_001.material b/Assets/Maps/Rotor/Material_001.material new file mode 100644 index 0000000000000000000000000000000000000000..2286d81612535db2dfabf74abe7f62df1cec4e8f GIT binary patch literal 1812 zcmbtVOK;mS4A$P*`~BWd1NH=(Hpg9pV&`7c;|2(fO~=Ay$)J=+cj`|cDcf?=?lu98 zqmR@llA@^j>HLT4$2I<5Ws&bAmeUrZ0eb=wiNB2e-#F&wuUH6!Ur~YD`U0$uUWWo5 zst3C|2Ms1K2wjP!TQZ(ZJX3er%HcNZ7D7-@cve|h1|11pXo1b6dY92vKpko*{YLij zEfm7>aMU}|VyRwaXpIzctF2kq(YU30mNm}n65Ckoh#{)y8JA63Z(P*D{J|ZnjVD{O zXQs8_fYjr>q%vD9JM+<5unR0bvu}0fB|(9f3-vxPVx99*6BcOJLtJ4e+R_AASk%xg z4CkSXVTS-+SP|;N6LUl+qXukHZ+VA4>cU%3S^|QgJAYE3dukIp&m=RPacF`rO;yRN z#+R5D^mu5oSXrP>A*a7@*&3LB3za@N&t zwrMbewWdhk4ih~jDb+_txeU@e+4v%;iyE9mn{EU7)v|Wj--bMsI!Xj@nBWqc86^AI za2UorjZW&POui0ax`o4pEs&OH$^VS`76~G!LAu6>I=xy?Q%o5fT#^geRbSpx@=d16 zbE%cWB2eKWX7nke;7st5e0!GRy8`<>l}^%C%@C0Eov>PP`B!qjky~1}mW!Oa$Hgqj zW`q?%5qFa#&X;_U#%2m>N~`rzUpnHA%zRY^jH$25bnFA-%^o5>irRFB9o2M?YPwG~ zy+pNx>`+NhYsqg-!%a_D+~<0Sl|;tPB7);ClN9OV-eNcu+^!=3QR)iI0ShUd+r13>@bKuM8J>xsH)ZX=pAZR7SZ}b%of#Mom?5=|;SG|eC++3e zje0hSQs=V|j9q8pG5g3r@?HtyCl;~aALp~r40QJAvoHK#_+@-$k+m|uvB-(YnDcx1 E7iiM|x&QzG literal 0 HcmV?d00001 diff --git a/CharacterSelect.gd b/CharacterSelect.gd index 1b7aebb..8b133bd 100644 --- a/CharacterSelect.gd +++ b/CharacterSelect.gd @@ -1,4 +1,12 @@ extends Control +onready var game = get_parent().get_parent() + +func _ready(): + var dir = Directory.new() + dir.open("res://Assets/Characters/") + + #$CenterContainer/VBoxContainer/CharacterList.add_child(null) + func spawn(): get_parent().get_parent().spawn(get_tree().get_network_unique_id()) diff --git a/CharacterSelect.tscn b/CharacterSelect.tscn index e822393..673eb10 100644 --- a/CharacterSelect.tscn +++ b/CharacterSelect.tscn @@ -21,28 +21,46 @@ __meta__ = { } [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = -146.0 +margin_left = -177.0 margin_top = -50.0 -margin_right = 146.0 +margin_right = 176.0 margin_bottom = 50.0 [node name="CharacterList" type="HBoxContainer" parent="CenterContainer/VBoxContainer"] -margin_right = 292.0 +margin_right = 353.0 margin_bottom = 48.0 +alignment = 1 __meta__ = { "_edit_use_anchors_": false } [node name="Button" type="Button" parent="CenterContainer/VBoxContainer/CharacterList"] -margin_right = 292.0 +margin_left = 30.0 +margin_right = 322.0 margin_bottom = 48.0 text = "Her Majesty the Queen" -[node name="SelectButton" type="Button" parent="CenterContainer/VBoxContainer"] -margin_left = 102.0 +[node name="Options" type="HBoxContainer" parent="CenterContainer/VBoxContainer"] margin_top = 52.0 -margin_right = 190.0 +margin_right = 353.0 margin_bottom = 100.0 +alignment = 1 + +[node name="SelectButton" type="Button" parent="CenterContainer/VBoxContainer/Options"] +margin_right = 88.0 +margin_bottom = 48.0 size_flags_horizontal = 4 text = "Select" -[connection signal="pressed" from="CenterContainer/VBoxContainer/SelectButton" to="." method="spawn"] + +[node name="OptionsButton" type="Button" parent="CenterContainer/VBoxContainer/Options"] +margin_left = 92.0 +margin_right = 199.0 +margin_bottom = 48.0 +text = "Options" + +[node name="DisconnectButton" type="Button" parent="CenterContainer/VBoxContainer/Options"] +margin_left = 203.0 +margin_right = 353.0 +margin_bottom = 48.0 +text = "Disconnect" +[connection signal="pressed" from="CenterContainer/VBoxContainer/Options/SelectButton" to="." method="spawn"] diff --git a/Game.gd b/Game.gd index ccc14c9..7c0ba04 100644 --- a/Game.gd +++ b/Game.gd @@ -209,6 +209,8 @@ func free_client(): get_tree().network_peer = null local_player = null + + return_to_menu("MainMenu") func quit(): get_tree().quit() diff --git a/Game.tscn b/Game.tscn index 8038439..d2f2119 100644 --- a/Game.tscn +++ b/Game.tscn @@ -300,6 +300,7 @@ alignment = 1 [connection signal="pressed" from="MenuContainer/MainMenu/Disconnect" to="." method="free_client"] [connection signal="pressed" from="MenuContainer/MainMenu/Options" to="." method="open_menu" binds= [ "OptionsMenu" ]] [connection signal="pressed" from="MenuContainer/MainMenu/Quit" to="." method="quit"] +[connection signal="pressed" from="MenuContainer/CharacterSelectScreen/CenterContainer/VBoxContainer/Options/DisconnectButton" to="." method="free_client"] [connection signal="pressed" from="MenuContainer/ConnectMenu/Back" to="." method="return_to_menu" binds= [ "MainMenu" ]] [connection signal="text_changed" from="MenuContainer/ConnectMenu/Destination/IPAdress" to="." method="set_ip"] [connection signal="pressed" from="MenuContainer/ConnectMenu/NetworkType/Host" to="." method="initialize_server"] @@ -315,3 +316,5 @@ alignment = 1 [connection signal="value_changed" from="MenuContainer/ControlsMenu/HBoxContainer/SensitivitySlider" to="." method="set_mouse_sensitivity"] [connection signal="pressed" from="MenuContainer/GraphicsMenu/Back" to="." method="return_to_menu" binds= [ "OptionsMenu" ]] [connection signal="toggled" from="MenuContainer/GraphicsMenu/Fullscreen" to="." method="set_fullscreen"] + +[editable path="MenuContainer/CharacterSelectScreen"]