public void Parse() { m_areaCount = int.Parse(m_mainElement.Attribute("area_count")); m_areas = new AreaParse[m_areaCount]; foreach (SecurityElement child in m_mainElement.Children) { var area = new AreaParse(child); area.Parse(); m_areas[area.index] = area; } }
/// <summary> /// 初始化 /// </summary> public void Init(AreaParse parse) { m_cubeRoot = CreateRoot("CubeRoot"); m_ornamentRoot = CreateRoot("OrnamentRoot"); m_cubes = new CubeComponent[parse.cubes.Length]; for (int i = 0; i < parse.cubes.Length; i++) { m_cubes[i] = CreateCubeComponent(parse.cubes[i], m_cubeRoot); } m_ornaments = new CubeComponent[parse.ornaments.Length]; for (int i = 0; i < parse.ornaments.Length; i++) { m_ornaments[i] = CreateCubeComponent(parse.ornaments[i], m_ornamentRoot); } }