loading udpate
This commit is contained in:
parent
6c8bfd4ec0
commit
bf16dfe508
18 changed files with 467 additions and 205 deletions
|
@ -2,13 +2,14 @@ extends Marker2D
|
|||
|
||||
@export var item: PackedScene
|
||||
@export var random_on_screen = false
|
||||
@export var radius = 100
|
||||
|
||||
func spawn():
|
||||
if get_tree().paused:
|
||||
return
|
||||
for i in range(10):
|
||||
var test_pos = Vector2(randf(), randf()) * Vector2(1920, 1080)
|
||||
if not $"../CollisionCheck".is_clear(test_pos):
|
||||
if not $"../CollisionCheck".is_clear(test_pos, radius):
|
||||
continue
|
||||
var node = item.instantiate()
|
||||
node.global_position = test_pos
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue