arrows now get deleted when offscreen

This commit is contained in:
pennyrigate 2022-12-19 16:41:00 -05:00
parent 2d3fc72ebe
commit b53c776021
4 changed files with 21 additions and 8 deletions

View file

@ -21,15 +21,9 @@ z_index = -1
texture = ExtResource( 2 )
[node name="Area2D" type="Area2D" parent="." groups=["arrow"]]
visible = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( -0.5, -0.5 )
shape = SubResource( 2 )
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
position = Vector2( -0.5, -0.5 )
scale = Vector2( 0.55, 0.35 )
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]