88 lines
2.7 KiB
Plaintext
88 lines
2.7 KiB
Plaintext
[gd_scene load_steps=8 format=3 uid="uid://cjxteipqurqy5"]
|
|
|
|
[ext_resource type="PackedScene" uid="uid://cm7lrhjnutqxx" path="res://player.tscn" id="1_80nbo"]
|
|
[ext_resource type="Script" uid="uid://dcr7q67iref5x" path="res://game.gd" id="1_feb5d"]
|
|
[ext_resource type="PackedScene" uid="uid://buqqojsie0k8c" path="res://ball.tscn" id="2_e2o6t"]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_feb5d"]
|
|
size = Vector2(1149, 644)
|
|
|
|
[sub_resource type="SystemFont" id="SystemFont_80nbo"]
|
|
|
|
[sub_resource type="LabelSettings" id="LabelSettings_80nbo"]
|
|
font = SubResource("SystemFont_80nbo")
|
|
font_size = 32
|
|
|
|
[sub_resource type="LabelSettings" id="LabelSettings_e2o6t"]
|
|
font = SubResource("SystemFont_80nbo")
|
|
font_size = 64
|
|
|
|
[node name="Game" type="Node2D"]
|
|
script = ExtResource("1_feb5d")
|
|
|
|
[node name="GameArea" type="Area2D" parent="." groups=["game_area"]]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="GameArea"]
|
|
position = Vector2(575.5, 323)
|
|
shape = SubResource("RectangleShape2D_feb5d")
|
|
|
|
[node name="Player1" parent="." instance=ExtResource("1_80nbo")]
|
|
unique_name_in_owner = true
|
|
position = Vector2(20, 70)
|
|
input_pickable = false
|
|
|
|
[node name="Player2" parent="." instance=ExtResource("1_80nbo")]
|
|
unique_name_in_owner = true
|
|
position = Vector2(1124, 578)
|
|
player_number = 2
|
|
|
|
[node name="Control" type="CanvasLayer" parent="."]
|
|
metadata/_edit_use_anchors_ = true
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="Control"]
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -138.0
|
|
offset_top = -224.0
|
|
offset_right = 138.0
|
|
offset_bottom = -87.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
metadata/_edit_use_anchors_ = true
|
|
|
|
[node name="GameText" type="Label" parent="Control/VBoxContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Welcome to Pong!"
|
|
label_settings = SubResource("LabelSettings_80nbo")
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="Control/VBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 6
|
|
size_flags_vertical = 4
|
|
|
|
[node name="Player1Score" type="Label" parent="Control/VBoxContainer/HBoxContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "0"
|
|
label_settings = SubResource("LabelSettings_e2o6t")
|
|
|
|
[node name="Label" type="Label" parent="Control/VBoxContainer/HBoxContainer"]
|
|
layout_mode = 2
|
|
text = ":"
|
|
label_settings = SubResource("LabelSettings_e2o6t")
|
|
|
|
[node name="Player2Score" type="Label" parent="Control/VBoxContainer/HBoxContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "0"
|
|
label_settings = SubResource("LabelSettings_e2o6t")
|
|
|
|
[node name="Ball" parent="." instance=ExtResource("2_e2o6t")]
|
|
position = Vector2(578, 635)
|
|
|
|
[connection signal="body_entered" from="Ball" to="." method="_on_ball_body_entered"]
|