예제 #1
0
파일: Level.cs 프로젝트: Rosthouse/JumpNRun
        public Level(string name, List<LevelBlock> entities, Vector2 spawnPosition, Background background)
        {
            this.name = name;
            this.entities = entities;
            this.spawnPosition = spawnPosition;
            this.background = background;

            TestXml();
        }
예제 #2
0
        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;
        }