first
This commit is contained in:
14
Maps/MapGenerator/itemSpawner.gd
Normal file
14
Maps/MapGenerator/itemSpawner.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends Node3D
|
||||
class_name ItemSpawner
|
||||
|
||||
@export var identifier: String
|
||||
@export var spawnedItem: PackedScene
|
||||
|
||||
func spawnItem() -> Node:
|
||||
if spawnedItem:
|
||||
var obj = spawnedItem.instantiate()
|
||||
self.add_child(obj)
|
||||
#obj.position = position
|
||||
#obj.rotation = rotation
|
||||
return obj
|
||||
return null
|
||||
Reference in New Issue
Block a user