-
Notifications
You must be signed in to change notification settings - Fork 0
/
field.tscn
121 lines (97 loc) · 4.22 KB
/
field.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[gd_scene load_steps=12 format=3 uid="uid://ckglopjagolbi"]
[ext_resource type="Script" path="res://gamemanager.gd" id="1_77wyn"]
[ext_resource type="Texture2D" uid="uid://m8brcrxhye6r" path="res://assets/midline.png" id="1_nvmc6"]
[ext_resource type="Script" path="res://boundary.gd" id="1_rjlku"]
[ext_resource type="PackedScene" uid="uid://i6nycioyjq64" path="res://ball.tscn" id="2_ygm2e"]
[ext_resource type="PackedScene" uid="uid://bl5phums20tas" path="res://paddle.tscn" id="4_rrm75"]
[ext_resource type="FontFile" uid="uid://8i8qsjsgt37y" path="res://assets/pong-score.ttf" id="6_06d00"]
[ext_resource type="AudioStream" uid="uid://dfj0vnltciaey" path="res://assets/bounce.wav" id="7_n4mdg"]
[ext_resource type="AudioStream" uid="uid://dhjxj2mbcyu5n" path="res://assets/score.wav" id="8_2e1bh"]
[ext_resource type="AudioStream" uid="uid://dcc0ag4vm5j5k" path="res://assets/paddle.wav" id="9_un88s"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kdrni"]
size = Vector2(1152, 24)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_2vw1m"]
[node name="Field" type="Node2D"]
script = ExtResource("1_77wyn")
[node name="Ball" parent="." instance=ExtResource("2_ygm2e")]
position = Vector2(568, 316)
input_pickable = false
[node name="LeftPaddle" parent="." instance=ExtResource("4_rrm75")]
position = Vector2(16, 244)
[node name="RightPaddle" parent="." instance=ExtResource("4_rrm75")]
position = Vector2(1112, 256)
humanControlled = false
[node name="TopBoundary" type="Area2D" parent="."]
collision_mask = 2
script = ExtResource("1_rjlku")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="TopBoundary"]
position = Vector2(576, 12)
shape = SubResource("RectangleShape2D_kdrni")
[node name="ColorRect" type="ColorRect" parent="TopBoundary"]
offset_right = 1152.0
offset_bottom = 24.0
[node name="BottomBoundary" type="Area2D" parent="."]
position = Vector2(0, 624)
collision_mask = 2
script = ExtResource("1_rjlku")
location = 1
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="BottomBoundary"]
position = Vector2(576, 12)
shape = SubResource("RectangleShape2D_kdrni")
[node name="ColorRect" type="ColorRect" parent="BottomBoundary"]
offset_right = 1152.0
offset_bottom = 24.0
[node name="MidLine" type="TextureRect" parent="."]
offset_left = 560.0
offset_top = 24.0
offset_right = 592.0
offset_bottom = 624.0
scale = Vector2(0.5, 1)
texture = ExtResource("1_nvmc6")
stretch_mode = 1
[node name="LeftBoundary" type="Area2D" parent="."]
position = Vector2(0, 353)
rotation = 1.5708
collision_mask = 2
script = ExtResource("1_rjlku")
location = 2
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="LeftBoundary"]
shape = SubResource("WorldBoundaryShape2D_2vw1m")
[node name="RightBoundary" type="Area2D" parent="."]
position = Vector2(1152, 353)
rotation = -1.5708
collision_mask = 2
script = ExtResource("1_rjlku")
location = 3
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="RightBoundary"]
shape = SubResource("WorldBoundaryShape2D_2vw1m")
[node name="LeftScore" type="Label" parent="."]
offset_left = 349.0
offset_top = 35.0
offset_right = 449.0
offset_bottom = 135.0
theme_override_fonts/font = ExtResource("6_06d00")
theme_override_font_sizes/font_size = 100
text = "0"
[node name="RightScore" type="Label" parent="."]
offset_left = 932.0
offset_top = 35.0
offset_right = 1032.0
offset_bottom = 135.0
theme_override_fonts/font = ExtResource("6_06d00")
theme_override_font_sizes/font_size = 100
text = "0"
[node name="SfxBounceEdge" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("7_n4mdg")
[node name="SfxScore" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("8_2e1bh")
[node name="SfxPaddle" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("9_un88s")
[connection signal="area_entered" from="TopBoundary" to="TopBoundary" method="_on_area_entered"]
[connection signal="area_entered" from="BottomBoundary" to="BottomBoundary" method="_on_area_entered"]
[connection signal="area_entered" from="LeftBoundary" to="LeftBoundary" method="_on_area_entered"]
[connection signal="area_entered" from="RightBoundary" to="RightBoundary" method="_on_area_entered"]