Update to 517e36e95dd65071e10ea065807ddbc4bd959f80
This commit is contained in:
parent
b9bd91e76a
commit
87ff8f85d8
1 changed files with 4 additions and 1 deletions
|
@ -56,7 +56,10 @@ func add_scene(sname: String, sclass: Node, type: CoreTypes.SceneType) -> bool:
|
|||
logger.verbf("sms", "Adding scene \"" + sname + "\" of type " + str(type))
|
||||
if exists(sname) != CoreTypes.SceneType.NONE:
|
||||
logger.errorf("sms", "Scene with name \"" + sname + "\" already exists")
|
||||
return true
|
||||
return false
|
||||
if typeof(sclass) != TYPE_OBJECT or !sclass.is_class("Node"):
|
||||
logger.errorf("sms", "Scene class \"" + sname + "\" is not of type Node"
|
||||
return false
|
||||
sclass.name = sname
|
||||
match(type):
|
||||
CoreTypes.SceneType.DEBUG: scenes_debug.add_child(sclass)
|
||||
|
|
Loading…
Reference in a new issue