Exemple #1
0
        private ConfigWorldGenerator ParseGenerator(string name, XmlElement generatorXML)
        {
            ConfigWorldGenerator generator = new ConfigWorldGenerator();

            generator.name = name;

            generator.surroundings.surroundingMaterial = GetAttributeIntValue(generatorXML, "surroundingMaterial", -1);
            generator.surroundings.surroundingLevel    = GetAttributeRelativeValue(generatorXML, "surroundingLevel", 0);
            generator.surroundings.surroundingOffsetY  = GetAttributeFloatValue(generatorXML, "surroundingOffsetY", 0);

            generator.generator = CreateGenerator(GetChildElements(generatorXML)[0]);
            return(generator);
        }
        private ConfigWorldGenerator ParseGenerator(string name, XmlElement generatorXML)
        {
            ConfigWorldGenerator generator = new ConfigWorldGenerator();
            generator.name = name;

            generator.surroundings.surroundingMaterial = GetAttributeIntValue(generatorXML, "surroundingMaterial", -1);
            generator.surroundings.surroundingLevel = GetAttributeRelativeValue(generatorXML, "surroundingLevel", 0);
            generator.surroundings.surroundingOffsetY = GetAttributeFloatValue(generatorXML, "surroundingOffsetY", 0);

            generator.generator = CreateGenerator(GetChildElements(generatorXML)[0]);
            return generator;
        }