49 lines
1.6 KiB
Text
49 lines
1.6 KiB
Text
[gd_scene load_steps=5 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, 3.5 )
|
|
|
|
[sub_resource type="RectangleShape2D" id=2]
|
|
extents = Vector2( 4, 0.5 )
|
|
|
|
[node name="FallingBlock" type="KinematicBody2D"]
|
|
collision_layer = 4
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
visible = false
|
|
position = Vector2( 4, 4.5 )
|
|
shape = SubResource( 1 )
|
|
|
|
[node name="Sprite" type="Sprite" parent="."]
|
|
texture = ExtResource( 1 )
|
|
centered = false
|
|
|
|
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
|
|
visible = false
|
|
position = Vector2( 4, 4 )
|
|
scale = Vector2( 0.4, 0.4 )
|
|
|
|
[node name="Area2D" type="Area2D" parent="."]
|
|
visible = false
|
|
collision_mask = 2
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
|
position = Vector2( 4, -0.5 )
|
|
shape = SubResource( 2 )
|
|
|
|
[node name="FallTimer" type="Timer" parent="."]
|
|
wait_time = 0.15
|
|
one_shot = true
|
|
|
|
[node name="RefreshTimer" type="Timer" parent="."]
|
|
wait_time = 2.0
|
|
|
|
[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="area_exited" from="Area2D" to="." method="_on_Area2D_area_exited"]
|
|
[connection signal="timeout" from="FallTimer" to="." method="_on_FallTimer_timeout"]
|
|
[connection signal="timeout" from="RefreshTimer" to="." method="_on_RefreshTimer_timeout"]
|