Pong/Scenes/Walls.tscn
Fries 02c5b90415 make a basic prototype for a scene.
right now theres just a moving ball, inside a box, with a working paddle. i had to make the ball kinematic and tell the ball to bounce when it hits the other direction.
2023-05-16 23:15:31 -07:00

35 lines
1.2 KiB
Text

[gd_scene load_steps=4 format=3 uid="uid://c5n541vsuvfk8"]
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_f7jy5"]
size = Vector2(30, 600)
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_868ov"]
size = Vector2(756, 30)
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_a4dbc"]
friction = 0.0
bounce = 1.0
[node name="Walls" type="Node2D"]
[node name="Left" type="Sprite2D" parent="."]
position = Vector2(-393, -2)
texture = SubResource("PlaceholderTexture2D_f7jy5")
[node name="Right" type="Sprite2D" parent="."]
position = Vector2(393, -2)
texture = SubResource("PlaceholderTexture2D_f7jy5")
[node name="Top" type="Sprite2D" parent="."]
position = Vector2(0, -287)
texture = SubResource("PlaceholderTexture2D_868ov")
[node name="Bottom" type="Sprite2D" parent="."]
position = Vector2(0, 283)
texture = SubResource("PlaceholderTexture2D_868ov")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
physics_material_override = SubResource("PhysicsMaterial_a4dbc")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
polygon = PackedVector2Array(-408, -302, 408, -302, 408, 298, -408, 298, -408, -301, -378, -272, -378, 268, 378, 268, 378, -272, -378, -272)