public static Point2D DeSerialize(IDataIn dataIn)
        {
            Point2D instance = new Point2D();

            instance.x = dataIn.ReadByte();
            instance.y = dataIn.ReadByte();
            return(instance);
        }
Beispiel #2
0
        public static FOWNode DeSerialize(IDataIn dataIn)
        {
            int length = dataIn.ReadInt();

            Point2D[] points    = new Point2D[length];
            byte[]    distances = new byte[length];

            for (int i = 0; i < length; i++)
            {
                byte    dist  = dataIn.ReadByte();
                Point2D point = Point2D.DeSerialize(dataIn);
                distances[i] = dist;
                points[i]    = point;
            }

            return(new FOWNode(points, distances));
        }