Axiom.Components.Paging.PageWorld.Load C# (CSharp) Method

Load() public method

Load world data from a serialiser (returns true if successful)
public Load ( StreamSerializer stream ) : bool
stream Axiom.Serialization.StreamSerializer
return bool
        public bool Load(StreamSerializer stream)
        {
            if (stream.ReadChunkBegin(CHUNK_ID, CHUNK_VERSION, "PageWorld") == null)
                return false;

            //name
            stream.Read(out mName);
            //sections
            while (stream.NextChunkId == PagedWorldSection.CHUNK_ID)
            {
                PagedWorldSection sec = new PagedWorldSection(this);
                bool sectionOk = sec.Load(stream);
                if (sectionOk)
                    mSections.Add(sec.Name, sec);
                else
                {
                    sec = null;
                    break;
                }
            }

            stream.ReadChunkEnd(CHUNK_ID);

            return true;
        }
        /// <summary>

Same methods

PageWorld::Load ( Stream stream ) : void
PageWorld::Load ( string fileName ) : void