diff --git a/prefabs/ball.tscn b/prefabs/ball.tscn new file mode 100644 index 0000000..e2f48d8 --- /dev/null +++ b/prefabs/ball.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=3 format=3 uid="uid://ylvptuj0xnm8"] + +[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_1mhds"] +bounce = 0.92 + +[sub_resource type="CircleShape2D" id="CircleShape2D_xd6lq"] +radius = 24.0 + +[node name="Ball" type="RigidBody2D"] +physics_material_override = SubResource("PhysicsMaterial_1mhds") + +[node name="Shape" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_xd6lq") +debug_color = Color(0.7, 0, 0, 0.419608) diff --git a/prefabs/peg.tscn b/prefabs/peg.tscn new file mode 100644 index 0000000..eff5d27 --- /dev/null +++ b/prefabs/peg.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://bbtm3534mdeat"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_cj4kg"] +radius = 24.0 + +[node name="Peg" type="StaticBody2D"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_cj4kg") +debug_color = Color(0.7, 0.7, 0.7, 0.419608) diff --git a/root.tscn b/root.tscn index 1f70029..7d43704 100644 --- a/root.tscn +++ b/root.tscn @@ -1,3 +1,21 @@ -[gd_scene format=3 uid="uid://d15wtjeqete7v"] +[gd_scene load_steps=3 format=3 uid="uid://d15wtjeqete7v"] + +[ext_resource type="PackedScene" uid="uid://ylvptuj0xnm8" path="res://prefabs/ball.tscn" id="1_d2cjj"] +[ext_resource type="PackedScene" uid="uid://bbtm3534mdeat" path="res://prefabs/peg.tscn" id="2_i427g"] [node name="Root" type="Node2D"] + +[node name="Ball" parent="." instance=ExtResource("1_d2cjj")] +position = Vector2(42, -281) + +[node name="Peg" parent="." instance=ExtResource("2_i427g")] +position = Vector2(77, -102) + +[node name="Peg2" parent="." instance=ExtResource("2_i427g")] +position = Vector2(-68, -70) + +[node name="Peg3" parent="." instance=ExtResource("2_i427g")] +position = Vector2(45, 77) + +[node name="Peg4" parent="." instance=ExtResource("2_i427g")] +position = Vector2(-114, 125)