mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
This leads to code that is easier to understand and runs faster thanks to GDScript's typed instructions. The untyped declaration warning is now enabled on all projects where type hints were added. All projects currently run without any untyped declration warnings. Dodge the Creeps and Squash the Creeps demos intentionally don't use type hints to match the documentation, where type hints haven't been adopted yet (given its beginner focus).
92 lines
2.8 KiB
Plaintext
92 lines
2.8 KiB
Plaintext
[gd_scene load_steps=3 format=3 uid="uid://c240icwf4uov8"]
|
|
|
|
[ext_resource type="Script" path="res://script/main.gd" id="1"]
|
|
[ext_resource type="PackedScene" uid="uid://dqxum77awcw6u" path="res://scene/game.tscn" id="2"]
|
|
|
|
[node name="Main" type="Control"]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
script = ExtResource("1")
|
|
|
|
[node name="Panel" type="Panel" parent="."]
|
|
layout_mode = 0
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
|
|
layout_mode = 0
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = 20.0
|
|
offset_top = 20.0
|
|
offset_right = -20.0
|
|
offset_bottom = -20.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"]
|
|
layout_mode = 2
|
|
|
|
[node name="Label" type="Label" parent="Panel/VBoxContainer/HBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Name"
|
|
|
|
[node name="NameEdit" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_stretch_ratio = 2.0
|
|
text = "A Godot User"
|
|
|
|
[node name="HBoxContainer2" type="HBoxContainer" parent="Panel/VBoxContainer"]
|
|
layout_mode = 2
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer/HBoxContainer2"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="Host" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
|
|
layout_mode = 2
|
|
text = "Host"
|
|
|
|
[node name="Control" type="Control" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="Connect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
|
|
layout_mode = 2
|
|
text = "Connect to"
|
|
|
|
[node name="Disconnect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
|
|
visible = false
|
|
layout_mode = 2
|
|
text = "Disconnect"
|
|
|
|
[node name="Hostname" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer2"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_stretch_ratio = 2.0
|
|
text = "localhost"
|
|
placeholder_text = "localhost"
|
|
|
|
[node name="Control" type="Control" parent="Panel/VBoxContainer"]
|
|
layout_mode = 2
|
|
|
|
[node name="Game" parent="Panel/VBoxContainer" instance=ExtResource("2")]
|
|
layout_mode = 2
|
|
|
|
[node name="AcceptDialog" type="AcceptDialog" parent="."]
|
|
dialog_text = "Connection closed"
|
|
|
|
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Host" to="." method="_on_Host_pressed"]
|
|
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Connect" to="." method="_on_Connect_pressed"]
|
|
[connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Disconnect" to="." method="_on_Disconnect_pressed"]
|