81 lines
2.3 KiB
Plaintext
81 lines
2.3 KiB
Plaintext
[gd_scene load_steps=11 format=3 uid="uid://d032da33bfwtu"]
|
|
|
|
[ext_resource type="Script" path="res://scripts/blocks/itemblock.gd" id="1_3b5hu"]
|
|
[ext_resource type="Texture2D" uid="uid://dth47lmb44qk8" path="res://assets/items.png" id="2_iid7x"]
|
|
[ext_resource type="PackedScene" uid="uid://b4dp88urmm7g8" path="res://scenes/items/mushroom.tscn" id="2_np1mh"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_lo6hv"]
|
|
atlas = ExtResource("2_iid7x")
|
|
region = Rect2(4, 4, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ghd0r"]
|
|
atlas = ExtResource("2_iid7x")
|
|
region = Rect2(34, 4, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_5py80"]
|
|
atlas = ExtResource("2_iid7x")
|
|
region = Rect2(64, 4, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_4m3oc"]
|
|
atlas = ExtResource("2_iid7x")
|
|
region = Rect2(4, 4, 16, 16)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_r54gk"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_lo6hv")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_ghd0r")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_5py80")
|
|
}],
|
|
"loop": false,
|
|
"name": &"destroy",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_4m3oc")
|
|
}],
|
|
"loop": true,
|
|
"name": &"idle",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4kmo0"]
|
|
size = Vector2(16, 16)
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_enc16"]
|
|
size = Vector2(10, 1)
|
|
|
|
[node name="itemblock" type="RigidBody2D"]
|
|
gravity_scale = 0.0
|
|
script = ExtResource("1_3b5hu")
|
|
hit_object = ExtResource("2_np1mh")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
sprite_frames = SubResource("SpriteFrames_r54gk")
|
|
animation = &"destroy"
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
shape = SubResource("RectangleShape2D_4kmo0")
|
|
|
|
[node name="activate" type="Area2D" parent="."]
|
|
collision_mask = 2
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="activate"]
|
|
position = Vector2(8, 0.5)
|
|
shape = SubResource("RectangleShape2D_enc16")
|
|
|
|
[node name="Timer" type="Timer" parent="."]
|
|
wait_time = 0.3
|
|
one_shot = true
|
|
|
|
[connection signal="body_entered" from="activate" to="." method="_on_activate_body_entered"]
|
|
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|