forked from team-sg/hero-mark-2
97 lines
2.8 KiB
Text
97 lines
2.8 KiB
Text
[gd_scene load_steps=8 format=2]
|
|
|
|
[ext_resource path="res://graphics/falling_block/falling_block_cave.png" type="Texture" id=1]
|
|
[ext_resource path="res://objects/environment/falling_block/falling_block.gd" type="Script" id=2]
|
|
|
|
[sub_resource type="RectangleShape2D" id=1]
|
|
extents = Vector2( 4, 1.5 )
|
|
|
|
[sub_resource type="RectangleShape2D" id=2]
|
|
extents = Vector2( 3.5, 0.5 )
|
|
|
|
[sub_resource type="RectangleShape2D" id=3]
|
|
extents = Vector2( 3, 0.5 )
|
|
|
|
[sub_resource type="Animation" id=4]
|
|
resource_name = "disappear"
|
|
length = 0.6
|
|
step = 0.05
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("Sprite:visible")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/keys = {
|
|
"times": PoolRealArray( 0.00203761, 0.1, 0.2, 0.3, 0.4, 0.5 ),
|
|
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
|
|
"update": 1,
|
|
"values": [ true, false, true, false, true, false ]
|
|
}
|
|
|
|
[sub_resource type="Animation" id=5]
|
|
resource_name = "idle"
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("Sprite:visible")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/keys = {
|
|
"times": PoolRealArray( 0 ),
|
|
"transitions": PoolRealArray( 1 ),
|
|
"update": 1,
|
|
"values": [ true ]
|
|
}
|
|
|
|
[node name="FallingBlock" type="KinematicBody2D"]
|
|
collision_layer = 4
|
|
script = ExtResource( 2 )
|
|
fall_speed = 1.0
|
|
|
|
[node name="Sprite" type="Sprite" parent="."]
|
|
texture = ExtResource( 1 )
|
|
centered = false
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2( 4, 2.5 )
|
|
shape = SubResource( 1 )
|
|
|
|
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
|
|
visible = false
|
|
position = Vector2( 4, 4 )
|
|
scale = Vector2( 0.4, 0.4 )
|
|
|
|
[node name="Area2D" type="Area2D" parent="."]
|
|
collision_mask = 2
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
|
position = Vector2( 4, 0 )
|
|
shape = SubResource( 2 )
|
|
|
|
[node name="FallTimer" type="Timer" parent="."]
|
|
process_mode = 0
|
|
wait_time = 0.1
|
|
one_shot = true
|
|
|
|
[node name="RefreshTimer" type="Timer" parent="."]
|
|
process_mode = 0
|
|
wait_time = 2.0
|
|
one_shot = true
|
|
|
|
[node name="CrushArea" type="Area2D" parent="."]
|
|
visible = false
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CrushArea"]
|
|
position = Vector2( 4, 4.5 )
|
|
shape = SubResource( 3 )
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
autoplay = "idle"
|
|
anims/disappear = SubResource( 4 )
|
|
anims/idle = SubResource( 5 )
|
|
|
|
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
|
|
[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"]
|
|
[connection signal="timeout" from="FallTimer" to="." method="_on_FallTimer_timeout"]
|
|
[connection signal="timeout" from="RefreshTimer" to="." method="_on_RefreshTimer_timeout"]
|