|
@@ -0,0 +1,95 @@
|
|
|
+[gd_scene load_steps=13 format=2]
|
|
|
+
|
|
|
+[ext_resource path="res://Scripts/Paddle.cs" type="Script" id=1]
|
|
|
+[ext_resource path="res://left_pallete.png" type="Texture" id=2]
|
|
|
+[ext_resource path="res://right_pallete.png" type="Texture" id=3]
|
|
|
+[ext_resource path="res://Scripts/Ball.cs" type="Script" id=4]
|
|
|
+[ext_resource path="res://ball.png" type="Texture" id=5]
|
|
|
+[ext_resource path="res://separator.png" type="Texture" id=6]
|
|
|
+[ext_resource path="res://Scripts/Wall.cs" type="Script" id=7]
|
|
|
+[ext_resource path="res://Scripts/CeilingFloor.cs" type="Script" id=8]
|
|
|
+
|
|
|
+[sub_resource type="RectangleShape2D" id=1]
|
|
|
+extents = Vector2( 4, 16 )
|
|
|
+
|
|
|
+[sub_resource type="RectangleShape2D" id=2]
|
|
|
+extents = Vector2( 4, 4 )
|
|
|
+
|
|
|
+[sub_resource type="RectangleShape2D" id=3]
|
|
|
+extents = Vector2( 10, 200 )
|
|
|
+
|
|
|
+[sub_resource type="RectangleShape2D" id=4]
|
|
|
+extents = Vector2( 320, 10 )
|
|
|
+
|
|
|
+[node name="Pong" type="Node2D"]
|
|
|
+
|
|
|
+[node name="Left" type="Area2D" parent="."]
|
|
|
+position = Vector2( 67.6285, 192.594 )
|
|
|
+script = ExtResource( 1 )
|
|
|
+
|
|
|
+[node name="Sprite" type="Sprite" parent="Left"]
|
|
|
+texture = ExtResource( 2 )
|
|
|
+
|
|
|
+[node name="Collision" type="CollisionShape2D" parent="Left"]
|
|
|
+shape = SubResource( 1 )
|
|
|
+
|
|
|
+[node name="Right" type="Area2D" parent="."]
|
|
|
+position = Vector2( 563.815, 188.919 )
|
|
|
+script = ExtResource( 1 )
|
|
|
+
|
|
|
+[node name="Sprite" type="Sprite" parent="Right"]
|
|
|
+texture = ExtResource( 3 )
|
|
|
+
|
|
|
+[node name="Collision" type="CollisionShape2D" parent="Right"]
|
|
|
+shape = SubResource( 1 )
|
|
|
+
|
|
|
+[node name="Ball" type="Area2D" parent="."]
|
|
|
+position = Vector2( 320.5, 191.124 )
|
|
|
+script = ExtResource( 4 )
|
|
|
+
|
|
|
+[node name="Sprite" type="Sprite" parent="Ball"]
|
|
|
+texture = ExtResource( 5 )
|
|
|
+
|
|
|
+[node name="Collision" type="CollisionShape2D" parent="Ball"]
|
|
|
+shape = SubResource( 2 )
|
|
|
+
|
|
|
+[node name="Separator" type="Sprite" parent="."]
|
|
|
+position = Vector2( 320, 200 )
|
|
|
+texture = ExtResource( 6 )
|
|
|
+
|
|
|
+[node name="Node2D" type="Node2D" parent="."]
|
|
|
+
|
|
|
+[node name="LeftWall" type="Area2D" parent="."]
|
|
|
+position = Vector2( -10, 200 )
|
|
|
+script = ExtResource( 7 )
|
|
|
+
|
|
|
+[node name="Collision" type="CollisionShape2D" parent="LeftWall"]
|
|
|
+shape = SubResource( 3 )
|
|
|
+
|
|
|
+[node name="RightWall" type="Area2D" parent="."]
|
|
|
+position = Vector2( 650, 200 )
|
|
|
+script = ExtResource( 7 )
|
|
|
+
|
|
|
+[node name="Collision" type="CollisionShape2D" parent="RightWall"]
|
|
|
+shape = SubResource( 3 )
|
|
|
+
|
|
|
+[node name="Ceiling" type="Area2D" parent="."]
|
|
|
+position = Vector2( 320, -10 )
|
|
|
+script = ExtResource( 8 )
|
|
|
+
|
|
|
+[node name="Collision" type="CollisionShape2D" parent="Ceiling"]
|
|
|
+shape = SubResource( 4 )
|
|
|
+
|
|
|
+[node name="Floor" type="Area2D" parent="."]
|
|
|
+position = Vector2( 320, 410 )
|
|
|
+script = ExtResource( 8 )
|
|
|
+_bounceDirection = -1
|
|
|
+
|
|
|
+[node name="Collision" type="CollisionShape2D" parent="Floor"]
|
|
|
+shape = SubResource( 4 )
|
|
|
+[connection signal="area_entered" from="Left" to="Left" method="OnAreaEntered"]
|
|
|
+[connection signal="area_entered" from="Right" to="Right" method="OnAreaEntered"]
|
|
|
+[connection signal="area_entered" from="LeftWall" to="LeftWall" method="OnWallAreaEntered"]
|
|
|
+[connection signal="area_entered" from="RightWall" to="RightWall" method="OnWallAreaEntered"]
|
|
|
+[connection signal="area_entered" from="Ceiling" to="Ceiling" method="OnAreaEntered"]
|
|
|
+[connection signal="area_entered" from="Floor" to="Floor" method="OnAreaEntered"]
|