예제 #1
0
        private static void decodeMogreRender(XmlElement n, Project project)
        {
            XmlNodeList nl = n.GetElementsByTagName("backgroundColor");

            foreach (XmlElement e in nl)
            {
                project.setBackGroundColor(Registry.instance().GetEngine("Python").run(new Script(e.InnerText)).asVec4());
            }
            nl = n.GetElementsByTagName("resources");
            foreach (XmlElement resources in nl)
            {
                XmlNodeList resourcesLocations = resources.GetElementsByTagName("resourceLocation");
                foreach (XmlElement resourceLocation in resourcesLocations)
                {
                    project.addMogreResourceLocation(resourceLocation.GetAttribute("name"), resourceLocation.GetAttribute("type"), resourceLocation.GetAttribute("group"));
                }
            }
            nl = n.GetElementsByTagName("Camera");
            foreach (XmlElement e in nl)
            {
                XmlNodeList properties = e.GetElementsByTagName("property");
                foreach (XmlElement prop in properties)
                {
                    Property property = new Property(prop.GetAttribute("name"), prop.GetAttribute("value"));
                    project.setProperty(property);
                }
            }
            nl = n.GetElementsByTagName("backGroundMaterial");
            foreach (XmlElement e in nl)
            {
                project.setBackGroundMaterial(Registry.instance().GetEngine("Python").run(new Script(e.InnerText)).asString());
            }
        }
예제 #2
0
 private static void decodeMogreRender(XmlElement n, Project project)
 {
     XmlNodeList nl = n.GetElementsByTagName("backgroundColor");
     foreach (XmlElement e in nl)
     {
         project.setBackGroundColor(Registry.instance().GetEngine("Python").run(new Script(e.InnerText)).asVec4());
     }
     nl = n.GetElementsByTagName("resources");
     foreach (XmlElement resources in nl)
     {
         XmlNodeList resourcesLocations = resources.GetElementsByTagName("resourceLocation");
         foreach (XmlElement resourceLocation in resourcesLocations)
         {
             project.addMogreResourceLocation(resourceLocation.GetAttribute("name"), resourceLocation.GetAttribute("type"), resourceLocation.GetAttribute("group"));
         }
     }
     nl = n.GetElementsByTagName("Camera");
     foreach (XmlElement e in nl)
     {
         XmlNodeList properties = e.GetElementsByTagName("property");
         foreach (XmlElement prop in properties)
         {
             Property property = new Property(prop.GetAttribute("name"), prop.GetAttribute("value"));
             project.setProperty(property);
         }
     }
     nl = n.GetElementsByTagName("backGroundMaterial");
     foreach (XmlElement e in nl)
     {
         project.setBackGroundMaterial(Registry.instance().GetEngine("Python").run(new Script(e.InnerText)).asString());
     }
 }