Tidy UP!
This commit is contained in:
parent
7ce2863cfd
commit
e216364ec1
12 changed files with 84 additions and 71 deletions
|
|
@ -7,7 +7,7 @@ var _active_walkers: Array[Node] = []
|
|||
var _batch_generation: int = 0
|
||||
|
||||
@onready var survivor = preload("res://scenes/survivor.tscn")
|
||||
@onready var survivor_spawn = get_node("/root/Game/World/SuvivorSpawn")
|
||||
@onready var survivor_spawn = get_node("/root/Game/World/SurvivorSpawn")
|
||||
@onready var start_pos: Vector3 = survivor_spawn.global_position
|
||||
|
||||
func _enter_tree() -> void:
|
||||
|
|
@ -38,6 +38,6 @@ func _run_batch(count: int, generation: int) -> void:
|
|||
func _spawn_one() -> void:
|
||||
var s = survivor.instantiate()
|
||||
var offset := Vector3(randf_range(-lateral_variance, lateral_variance), 0, 0)
|
||||
get_tree().root.add_child.call_deferred(s)
|
||||
add_child.call_deferred(s)
|
||||
s.position = start_pos + offset
|
||||
_active_walkers.append(s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue