Added Map; Added Spawners; Changed Decorations; Cleaned up Code and some Settings; Added Enemy
This commit is contained in:
parent
e82438139f
commit
e18beb6c4c
160 changed files with 4674 additions and 182 deletions
14
Spawner/spawner.gd
Normal file
14
Spawner/spawner.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
extends Marker2D
|
||||
|
||||
@export var spawnObjectsPaths : Array[String] = []
|
||||
@export var enabled = true
|
||||
|
||||
func _ready() -> void:
|
||||
randomize()
|
||||
|
||||
func spawn(spawnNode : Node):
|
||||
if enabled:
|
||||
var t = randi_range(0, spawnObjectsPaths.size())
|
||||
var spawnObject = load(spawnObjectsPaths.pick_random()).instantiate()
|
||||
spawnObject.global_position = global_position
|
||||
spawnNode.add_child(spawnObject)
|
||||
Loading…
Add table
Add a link
Reference in a new issue