📜  如何使用代码 godot 在节点中实例化 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:26.481000             🧑  作者: Mango

代码示例1
#Load the resourse using preload
const MySmokeResource = preload("res://SmokeScene.tscn")

func _ready():
    #Make instance
    var GrabedInstance= MySmokeResource.instance()
    #You could now make changes to the new instance if you wanted
    CurrentEntry.name = "SmokeA"
    #Attach it to the tree
    self.add_child(GrabedInstance)