2024-04-16 20:29:45 -04:00
|
|
|
extends ShapeCast2D
|
|
|
|
|
2024-04-19 17:59:19 -04:00
|
|
|
func is_clear(area: Vector2, radius=100):
|
2024-04-16 20:29:45 -04:00
|
|
|
position = area
|
2024-04-19 17:59:19 -04:00
|
|
|
shape.radius = radius
|
2024-05-06 10:05:42 -04:00
|
|
|
#$Sprite2D.scale = Vector2.ONE * 0.375 * (radius/100)
|
2024-04-16 20:29:45 -04:00
|
|
|
force_shapecast_update()
|
|
|
|
return get_collision_count() == 0
|
|
|
|
|
|
|
|
func flash():
|
|
|
|
$Sprite2D.visible = true
|
|
|
|
await get_tree().create_timer(0.2).timeout # waits for .2 seconds
|
|
|
|
$Sprite2D.visible = false
|