1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[gd_scene load_steps=3 format=2] [ext_resource path="res://Square.gd" type="Script" id=1] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 381, 394.5 ) [node name="Square" type="ColorRect"] anchor_right = 1.0 anchor_bottom = 1.0 mouse_filter = 2 script = ExtResource( 1 ) [node name="Squarea" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Squarea"] shape = SubResource( 1 ) [connection signal="input_event" from="Squarea" to="." method="_on_Squarea_input_event"]