Esempio n. 1
0
        public void Read(System.IO.BinaryReader r)
        {
            TileWidth  = r.ReadInt32();
            TileHeight = r.ReadInt32();
            int lc = r.ReadInt32();

            for (int i = 0; i < lc; i++)
            {
                var l = new Vivid.Scene.GraphLight();
                l.Read(r);
                Lights.Add(l);
            }
            int mc = r.ReadInt32();

            for (int i = 0; i < mc; i++)
            {
                var m = new Vivid.Scene.GraphMarker();
                m.Read(r);
                Markers.Add(m);
            }
            int layc = r.ReadInt32();

            Layers = new List <MapLayer>();
            for (int l = 0; l < layc; l++)
            {
                var ml = new MapLayer(1, 1, this);
                ml.Read(r);
                Layers.Add(ml);
            }
        }
Esempio n. 2
0
        public void ReadGraph(BinaryReader r)
        {
            X   = r.ReadSingle();
            Y   = r.ReadSingle();
            Z   = r.ReadSingle();
            Rot = r.ReadSingle();
            int lc = r.ReadInt32();

            for (int i = 0; i < lc; i++)
            {
                GraphLight nl = new GraphLight();
                nl.Read(r);
                Add(nl);
            }
            Root = new GraphNode
            {
                Graph = this
            };
            Root.Read(r);
        }