[gd_scene load_steps=4 format=3 uid="uid://dxikyr5pr825m"] [sub_resource type="GDScript" id="GDScript_v1yxm"] script/source = "extends StaticBody2D func _physics_process(delta: float) -> void: position.y += delta func _on_area_2d_body_entered(body: Node2D) -> void: modulate = Color.RED " [sub_resource type="RectangleShape2D" id="RectangleShape2D_gco0t"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_pnoax"] size = Vector2(372, 20) [node name="Node2D" type="Node2D"] [node name="StaticBody2D" type="StaticBody2D" parent="."] position = Vector2(371, 195) script = SubResource("GDScript_v1yxm") [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] shape = SubResource("RectangleShape2D_gco0t") [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] position = Vector2(384, 219) shape = SubResource("RectangleShape2D_pnoax") [connection signal="body_entered" from="Area2D" to="StaticBody2D" method="_on_area_2d_body_entered"]