Beispiel #1
0
 internal static Team Parse(BinaryReader reader, MapParseContext context)
 {
     return(new Team
     {
         Properties = AssetPropertyCollection.Parse(reader, context)
     });
 }
Beispiel #2
0
 internal static WorldInfo Parse(BinaryReader reader, MapParseContext context)
 {
     return(ParseAsset(reader, context, version =>
     {
         return new WorldInfo
         {
             Properties = AssetPropertyCollection.Parse(reader, context)
         };
     }));
 }
Beispiel #3
0
 internal static MapObject Parse(BinaryReader reader, MapParseContext context)
 {
     return(ParseAsset(reader, context, version =>
     {
         return new MapObject
         {
             Position = reader.ReadVector3(),
             Angle = reader.ReadSingle(),
             RoadType = reader.ReadUInt32AsEnumFlags <RoadType>(),
             TypeName = reader.ReadUInt16PrefixedAsciiString(),
             Properties = AssetPropertyCollection.Parse(reader, context)
         };
     }));
 }
Beispiel #4
0
        internal static Player Parse(BinaryReader reader, MapParseContext context, ushort version)
        {
            var result = new Player
            {
                Properties = AssetPropertyCollection.Parse(reader, context)
            };

            var numBuildListItems = reader.ReadUInt32();
            var buildListItems    = new BuildListItem[numBuildListItems];

            for (var i = 0; i < numBuildListItems; i++)
            {
                buildListItems[i] = BuildListItem.Parse(reader, version);
            }

            result.BuildList = buildListItems;

            return(result);
        }