2024-09-21 18:25:26 +03:00
|
|
|
[gd_scene load_steps=9 format=3 uid="uid://dtya31nfxo0h7"]
|
2024-09-16 23:25:08 +03:00
|
|
|
|
|
|
|
[ext_resource type="Texture2D" uid="uid://ccs76qyn4ua40" path="res://puzzles/assets/ball.png" id="1_3p6vy"]
|
2024-09-21 18:25:26 +03:00
|
|
|
[ext_resource type="Script" path="res://puzzles/ball/ball.gd" id="1_8r0ul"]
|
2024-09-16 23:25:08 +03:00
|
|
|
|
|
|
|
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_8in3v"]
|
|
|
|
|
2024-09-21 18:25:26 +03:00
|
|
|
[sub_resource type="Animation" id="Animation_2lwo2"]
|
|
|
|
length = 0.001
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:rotation")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0),
|
|
|
|
"transitions": PackedFloat32Array(1),
|
|
|
|
"update": 0,
|
|
|
|
"values": [0.0]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id="Animation_r6vqa"]
|
|
|
|
resource_name = "roll"
|
|
|
|
length = 3.0
|
|
|
|
loop_mode = 1
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/path = NodePath("Sprite2D:rotation")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PackedFloat32Array(0, 3),
|
|
|
|
"transitions": PackedFloat32Array(1, 1),
|
|
|
|
"update": 0,
|
|
|
|
"values": [0.0, 6.28319]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_srpra"]
|
|
|
|
_data = {
|
|
|
|
"RESET": SubResource("Animation_2lwo2"),
|
|
|
|
"roll": SubResource("Animation_r6vqa")
|
|
|
|
}
|
|
|
|
|
2024-09-16 23:25:08 +03:00
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_we7nh"]
|
|
|
|
size = Vector2(14, 14)
|
|
|
|
|
2024-09-21 18:25:26 +03:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_eid6d"]
|
|
|
|
radius = 7.0
|
|
|
|
|
2024-09-16 23:25:08 +03:00
|
|
|
[node name="Ball" type="StaticBody2D"]
|
|
|
|
physics_material_override = SubResource("PhysicsMaterial_8in3v")
|
2024-09-21 18:25:26 +03:00
|
|
|
script = ExtResource("1_8r0ul")
|
|
|
|
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
|
|
libraries = {
|
|
|
|
"": SubResource("AnimationLibrary_srpra")
|
|
|
|
}
|
|
|
|
autoplay = "roll"
|
2024-09-16 23:25:08 +03:00
|
|
|
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
|
|
texture = ExtResource("1_3p6vy")
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
|
|
shape = SubResource("RectangleShape2D_we7nh")
|
2024-09-21 18:25:26 +03:00
|
|
|
|
|
|
|
[node name="RayCast2D" type="RayCast2D" parent="."]
|
|
|
|
target_position = Vector2(8, 0)
|
|
|
|
|
|
|
|
[node name="Area2D" type="Area2D" parent="."]
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
|
|
|
shape = SubResource("CircleShape2D_eid6d")
|
|
|
|
|
|
|
|
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
|
|
|
|
[connection signal="area_entered" from="Area2D" to="." method="_on_area_entered"]
|