11[gd_scene load_steps =13 format =2 ]
22
3- [ext_resource path ="res://paddle.gd" type ="Script" id =1 ]
3+ [ext_resource path ="res://scripts/ paddle.gd" type ="Script" id =1 ]
44[ext_resource path ="res://left_pallete.png" type ="Texture" id =2 ]
55[ext_resource path ="res://right_pallete.png" type ="Texture" id =3 ]
6- [ext_resource path ="res://ball.gd" type ="Script" id =4 ]
6+ [ext_resource path ="res://scripts/ ball.gd" type ="Script" id =4 ]
77[ext_resource path ="res://ball.png" type ="Texture" id =5 ]
88[ext_resource path ="res://separator.png" type ="Texture" id =6 ]
9- [ext_resource path ="res://wall.gd" type ="Script" id =7 ]
10- [ext_resource path ="res://ceiling_floor.gd" type ="Script" id =8 ]
9+ [ext_resource path ="res://scripts/ wall.gd" type ="Script" id =7 ]
10+ [ext_resource path ="res://scripts/ ceiling_floor.gd" type ="Script" id =8 ]
1111
1212[sub_resource type ="RectangleShape2D" id =1 ]
1313extents = Vector2 ( 4 , 16 )
@@ -21,86 +21,85 @@ extents = Vector2( 10, 200 )
2121[sub_resource type ="RectangleShape2D" id =4 ]
2222extents = Vector2 ( 320 , 10 )
2323
24- [node name ="game " type ="Node2D" ]
24+ [node name ="Pong " type ="Node2D" ]
2525
26- [node name ="ColorRect " type ="ColorRect" parent ="." ]
26+ [node name ="Background " type ="ColorRect" parent ="." ]
2727margin_right = 640.0
2828margin_bottom = 400.0
2929color = Color ( 0.141176 , 0.152941 , 0.164706 , 1 )
3030__meta__ = {
3131"_edit_use_anchors_" : false
3232}
3333
34- [node name ="left " type ="Area2D" parent ="." ]
34+ [node name ="Left " type ="Area2D" parent ="." ]
3535position = Vector2 ( 67.6285 , 192.594 )
3636script = ExtResource ( 1 )
3737
38- [node name ="sprite " type ="Sprite" parent ="left " ]
38+ [node name ="Sprite " type ="Sprite" parent ="Left " ]
3939texture = ExtResource ( 2 )
4040
41- [node name ="collision " type ="CollisionShape2D" parent ="left " ]
41+ [node name ="Collision " type ="CollisionShape2D" parent ="Left " ]
4242shape = SubResource ( 1 )
4343
44- [node name ="right " type ="Area2D" parent ="." ]
44+ [node name ="Right " type ="Area2D" parent ="." ]
4545position = Vector2 ( 563.815 , 188.919 )
4646script = ExtResource ( 1 )
47- ball_dir = -1
4847
49- [node name ="sprite " type ="Sprite" parent ="right " ]
48+ [node name ="Sprite " type ="Sprite" parent ="Right " ]
5049texture = ExtResource ( 3 )
5150
52- [node name ="collision " type ="CollisionShape2D" parent ="right " ]
51+ [node name ="Collision " type ="CollisionShape2D" parent ="Right " ]
5352shape = SubResource ( 1 )
5453
55- [node name ="ball " type ="Area2D" parent ="." ]
54+ [node name ="Ball " type ="Area2D" parent ="." ]
5655position = Vector2 ( 320.5 , 191.124 )
5756script = ExtResource ( 4 )
5857
59- [node name ="sprite " type ="Sprite" parent ="ball " ]
58+ [node name ="Sprite " type ="Sprite" parent ="Ball " ]
6059texture = ExtResource ( 5 )
6160
62- [node name ="collision " type ="CollisionShape2D" parent ="ball " ]
61+ [node name ="Collision " type ="CollisionShape2D" parent ="Ball " ]
6362shape = SubResource ( 2 )
6463
65- [node name ="separator " type ="Sprite" parent ="." ]
64+ [node name ="Separator " type ="Sprite" parent ="." ]
6665position = Vector2 ( 320 , 200 )
6766texture = ExtResource ( 6 )
6867
69- [node name ="left_wall " type ="Area2D" parent ="." ]
68+ [node name ="LeftWall " type ="Area2D" parent ="." ]
7069position = Vector2 ( -10 , 200 )
7170script = ExtResource ( 7 )
7271
73- [node name ="collision " type ="CollisionShape2D" parent ="left_wall " ]
72+ [node name ="Collision " type ="CollisionShape2D" parent ="LeftWall " ]
7473shape = SubResource ( 3 )
7574
76- [node name ="right_wall " type ="Area2D" parent ="." ]
75+ [node name ="RightWall " type ="Area2D" parent ="." ]
7776position = Vector2 ( 650 , 200 )
7877script = ExtResource ( 7 )
7978
80- [node name ="collision " type ="CollisionShape2D" parent ="right_wall " ]
79+ [node name ="Collision " type ="CollisionShape2D" parent ="RightWall " ]
8180shape = SubResource ( 3 )
8281
83- [node name ="ceiling " type ="Area2D" parent ="." ]
82+ [node name ="Ceiling " type ="Area2D" parent ="." ]
8483position = Vector2 ( 320 , -10 )
8584script = ExtResource ( 8 )
8685
87- [node name ="collision " type ="CollisionShape2D" parent ="ceiling " ]
86+ [node name ="Collision " type ="CollisionShape2D" parent ="Ceiling " ]
8887shape = SubResource ( 4 )
8988
90- [node name ="floor " type ="Area2D" parent ="." ]
89+ [node name ="Floor " type ="Area2D" parent ="." ]
9190position = Vector2 ( 320 , 410 )
9291script = ExtResource ( 8 )
93- y_direction = -1
92+ _bounce_direction = -1
9493
95- [node name ="collision " type ="CollisionShape2D" parent ="floor " ]
94+ [node name ="Collision " type ="CollisionShape2D" parent ="Floor " ]
9695shape = SubResource ( 4 )
9796
9897[node name ="Camera2D" type ="Camera2D" parent ="." ]
9998offset = Vector2 ( 320 , 200 )
10099current = true
101- [connection signal ="area_entered" from ="left " to ="left " method ="_on_area_entered" ]
102- [connection signal ="area_entered" from ="right " to ="right " method ="_on_area_entered" ]
103- [connection signal ="area_entered" from ="left_wall " to ="left_wall " method ="_on_wall_area_entered" ]
104- [connection signal ="area_entered" from ="right_wall " to ="right_wall " method ="_on_wall_area_entered" ]
105- [connection signal ="area_entered" from ="ceiling " to ="ceiling " method ="_on_area_entered" ]
106- [connection signal ="area_entered" from ="floor " to ="floor " method ="_on_area_entered" ]
100+ [connection signal ="area_entered" from ="Left " to ="Left " method ="_on_area_entered" ]
101+ [connection signal ="area_entered" from ="Right " to ="Right " method ="_on_area_entered" ]
102+ [connection signal ="area_entered" from ="LeftWall " to ="LeftWall " method ="_on_wall_area_entered" ]
103+ [connection signal ="area_entered" from ="RightWall " to ="RightWall " method ="_on_wall_area_entered" ]
104+ [connection signal ="area_entered" from ="Ceiling " to ="Ceiling " method ="_on_area_entered" ]
105+ [connection signal ="area_entered" from ="Floor " to ="Floor " method ="_on_area_entered" ]
0 commit comments