Exemplo n.º 1
0
        static partial void SetBlocks(MapData map, UdmfSyntaxTree tree)
        {
            foreach (var block in tree.Blocks)
            {
                switch (block.Name.ToLower())
                {
                case "linedef":
                    map.LineDefs.Add(ParseLineDef(block));
                    break;

                case "sidedef":
                    map.SideDefs.Add(ParseSideDef(block));
                    break;

                case "vertex":
                    map.Vertices.Add(ParseVertex(block));
                    break;

                case "sector":
                    map.Sectors.Add(ParseSector(block));
                    break;

                case "thing":
                    map.Things.Add(ParseThing(block));
                    break;
                }
            }
        }
Exemplo n.º 2
0
 static partial void SetGlobalAssignments(MapData map, UdmfSyntaxTree tree)
 {
     tree.GetValueFor("NameSpace").SetRequiredString(value => map.NameSpace = value, "MapData", "NameSpace");
     tree.GetValueFor("Comment").SetOptionalString(value => map.Comment     = value, "MapData", "Comment");
 }