📜  godot spawn 对象 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:18.646000             🧑  作者: Mango

代码示例1
node = preload("res://node.tscn") #Whatever you want to spawn

func whatever():
    nodeInstance = node.instance()
    nodeInstance.position = Vector2(x, y) 
    add_child(nodeInstance) #Spawns wherever script is attatched.