This repository has been archived on 2024-09-30. You can view files and clone it, but cannot push or open issues/pull-requests.
gbjam12/puzzles/ball/ball.tscn

79 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

[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"]
[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"]
[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
step = 0.3
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)
[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")
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")
[node name="RayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(8, 0)
[node name="Area2D" type="Area2D" parent="." groups=["death"]]
[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"]