public Level(string name, List<LevelBlock> entities, Vector2 spawnPosition, Background background) { this.name = name; this.entities = entities; this.spawnPosition = spawnPosition; this.background = background; TestXml(); }
public XmlNode WriteBackground(Background background, XmlDocument xmlDocument) { XmlNode backgroundNode = xmlDocument.CreateNode(XmlNodeType.Element, "Background", null); XmlNode origin = WriteVector2(xmlDocument, "ScreenPosition", background.Origin); XmlNode textureAsset = xmlDocument.CreateNode(XmlNodeType.Element, "TextureAsset", null); textureAsset.InnerText = background.TextureAsset; backgroundNode.AppendChild(origin); backgroundNode.AppendChild(textureAsset); return backgroundNode; }