Team switch

This commit is contained in:
Rendo 2025-12-07 17:21:01 +05:00
commit 59bf07b076
5 changed files with 89 additions and 2 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=23 format=3 uid="uid://cqrh2cc7m2i7f"]
[gd_scene load_steps=24 format=3 uid="uid://cqrh2cc7m2i7f"]
[ext_resource type="Environment" uid="uid://d0cfgtx2yxw13" path="res://environments/prototype_environment.tres" id="1_i6jab"]
[ext_resource type="Material" uid="uid://bx3f5vx71ynh5" path="res://materials/Graymat.tres" id="4_y6i55"]
@ -18,6 +18,7 @@
[ext_resource type="Script" uid="uid://3i00rp8urth7" path="res://scripts/object_container.gd" id="11_02ic3"]
[ext_resource type="Script" uid="uid://bala54fa32e35" path="res://scripts/gui/hud/player_round_display.gd" id="17_wsuwo"]
[ext_resource type="Script" uid="uid://bos7nftlx8tv3" path="res://scripts/gui/hud/player_round_time.gd" id="18_0hcup"]
[ext_resource type="Script" uid="uid://m8qq2eynls6n" path="res://scripts/gui/team_choice_menu.gd" id="19_0hcup"]
[sub_resource type="BoxShape3D" id="BoxShape3D_ysk2e"]
size = Vector3(15.324341, 0.96273804, 21.381592)
@ -339,3 +340,47 @@ script = ExtResource("18_0hcup")
[node name="RoundDisplayTheir" type="Label" parent="CanvasLayer/RoundData"]
layout_mode = 2
script = ExtResource("17_wsuwo")
[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"]
visible = false
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("19_0hcup")
[node name="Panel" type="PanelContainer" parent="CanvasLayer/CenterContainer"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/CenterContainer/Panel"]
layout_mode = 2
[node name="Label" type="Label" parent="CanvasLayer/CenterContainer/Panel/VBoxContainer"]
layout_mode = 2
text = "Choose your team"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/CenterContainer/Panel/VBoxContainer"]
layout_mode = 2
[node name="SpectatorButton" type="Button" parent="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Spectators"
[node name="AttackButton" type="Button" parent="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Attackers"
[node name="DefenceButton" type="Button" parent="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Defenders"
[node name="CancelButton" type="Button" parent="CanvasLayer/CenterContainer/Panel/VBoxContainer"]
layout_mode = 2
text = "Cancel"
[connection signal="pressed" from="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer/SpectatorButton" to="CanvasLayer/CenterContainer" method="_on_spectator_button_pressed"]
[connection signal="pressed" from="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer/AttackButton" to="CanvasLayer/CenterContainer" method="_on_attack_button_pressed"]
[connection signal="pressed" from="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer/DefenceButton" to="CanvasLayer/CenterContainer" method="_on_defence_button_pressed"]
[connection signal="pressed" from="CanvasLayer/CenterContainer/Panel/VBoxContainer/CancelButton" to="CanvasLayer/CenterContainer" method="_on_cancel_button_pressed"]