Beispiel #1
0
        public void Deserialize(Stream stream)
        {
            var list = new List <DataPlayerZone>();
            int len  = 0;

            Read(stream, out len);
            for (int i = 0; i < len; i++)
            {
                DataPlayerZone e = new DataPlayerZone();
                e.Deserialize(stream);
                list.Add(e);
            }
            zones = list;
        }
Beispiel #2
0
        public void Deserialize(Stream stream)
        {
            Read(stream, out w);
            Read(stream, out h);
            Read(stream, out mapW);
            Read(stream, out mapH);
            Read(stream, out density);
            Read(stream, out zombieSpeed);
            Read(stream, out timescale);

            {
                var list = new List <DataZombie>();
                int len  = 0;
                Read(stream, out len);
                for (int i = 0; i < len; i++)
                {
                    DataZombie e = new DataZombie();
                    e.Deserialize(stream);
                    list.Add(e);
                }
                active = list;
            }

            {
                var list = new List <DataZombie>();
                int len  = 0;
                Read(stream, out len);
                for (int i = 0; i < len; i++)
                {
                    DataZombie e = new DataZombie();
                    e.Deserialize(stream);
                    list.Add(e);
                }
                inactive = list;
            }

            {
                var list = new List <DataPlayerZone>();
                int len  = 0;
                Read(stream, out len);
                for (int i = 0; i < len; i++)
                {
                    DataPlayerZone e = new DataPlayerZone();
                    e.Deserialize(stream);
                    list.Add(e);
                }
                playerZones = list;
            }

            {
                var list = new List <DataPOIZone>();
                int len  = 0;
                Read(stream, out len);
                for (int i = 0; i < len; i++)
                {
                    DataPOIZone e = new DataPOIZone();
                    e.Deserialize(stream);
                    list.Add(e);
                }
                poiZones = list;
            }

            {
                var list = new List <DataWorldZone>();
                int len  = 0;
                Read(stream, out len);
                for (int i = 0; i < len; i++)
                {
                    DataWorldZone e = new DataWorldZone();
                    e.Deserialize(stream);
                    list.Add(e);
                }
                worldZones = list;
            }
        }