Make drop areas react to collision with "cursor" scene

This is a preparation to allow drop areas on GUI elements.
This commit is contained in:
blinry 2020-11-07 13:59:47 +01:00
parent f6c7ef90d8
commit 38faac5485
10 changed files with 53 additions and 12 deletions

View file

@ -10,10 +10,13 @@ radius = 23.5871
"drop_areas",
]]
position = Vector2( -0.197731, 0.0673599 )
z_index = -2
z_index = 2
script = ExtResource( 1 )
[node name="Area2D" type="Area2D" parent="."]
input_pickable = false
collision_layer = 0
collision_mask = 524288
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 1 )
@ -25,5 +28,5 @@ modulate = Color( 0.847059, 0.788235, 0.996078, 0.533333 )
position = Vector2( 0.177797, -0.65835 )
scale = Vector2( 1.23678, 1.23678 )
texture = ExtResource( 2 )
[connection signal="mouse_entered" from="Area2D" to="." method="_mouse_entered"]
[connection signal="mouse_exited" from="Area2D" to="." method="_mouse_exited"]
[connection signal="area_entered" from="Area2D" to="." method="_mouse_entered"]
[connection signal="area_exited" from="Area2D" to="." method="_mouse_exited"]