57 lines
1.7 KiB
Text
57 lines
1.7 KiB
Text
[gd_scene load_steps=7 format=2]
|
|
|
|
[ext_resource path="res://tilesets/t_factory.tres" type="TileSet" id=1]
|
|
[ext_resource path="res://objects/environment/collapse_block/collapse_block.gd" type="Script" id=2]
|
|
|
|
[sub_resource type="PhysicsMaterial" id=2]
|
|
bounce = 0.07
|
|
|
|
[sub_resource type="RectangleShape2D" id=1]
|
|
extents = Vector2( 4, 4 )
|
|
|
|
[sub_resource type="Animation" id=3]
|
|
length = 0.001
|
|
|
|
[sub_resource type="Animation" id=4]
|
|
resource_name = "die"
|
|
length = 1.5
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("TileMap:visible")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/keys = {
|
|
"times": PoolRealArray( 0, 0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4 ),
|
|
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ),
|
|
"update": 1,
|
|
"values": [ true, false, true, false, true, false, true, false ]
|
|
}
|
|
|
|
[node name="CollapseBlock" type="RigidBody2D" groups=["collapse_block"]]
|
|
physics_material_override = SubResource( 2 )
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="TileMap" type="TileMap" parent="."]
|
|
tile_set = ExtResource( 1 )
|
|
collision_layer = 0
|
|
collision_mask = 0
|
|
format = 1
|
|
tile_data = PoolIntArray( 0, 0, 0 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2( 4, 4 )
|
|
shape = SubResource( 1 )
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
anims/RESET = SubResource( 3 )
|
|
anims/die = SubResource( 4 )
|
|
|
|
[node name="Timer" type="Timer" parent="."]
|
|
wait_time = 3.0
|
|
one_shot = true
|
|
autostart = true
|
|
|
|
[connection signal="body_entered" from="." to="." method="_on_CollapseBlock_body_entered"]
|
|
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
|
|
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|