Project.fromXMLNode constructor
Project.fromXMLNode(
- XMLNode node
)
Implementation
@override
Project.fromXMLNode(XMLNode node)
: name = node.attributes.remove('name')!,
stories = node
.childrenToMap()
.getValue('stories', (it) => Resource.fromXMLNode(it))!,
variables = node
.childrenToMap()
.getValue('variables', (it) => GlobalVariable.fromXMLNode(it))!,
backgrounds = node
.childrenToMap()
.getValue('backgrounds', (it) => Resource.fromXMLNode(it))!,
sounds = node
.childrenToMap()
.getValue('sounds', (it) => Resource.fromXMLNode(it))!,
scenes = node
.childrenToMap()
.getValue('scenes', (it) => Scene.fromXMLNode(it))!,
characters = node
.childrenToMap()
.getValue('characters', (it) => Character.fromXMLNode(it))!,
extraAttributes = node.attributes;