예제 #1
0
        /// <summary>
        /// ExportData
        /// </summary>
        /// <param name="tagName"></param>
        /// <param name="dict"></param>
        /// <returns></returns>
        public bool ExportData(string tagName, Dictionary <int, MyMeshPartInfo> dict)
        {
            WriteTag(tagName);
            m_writer.Write(dict.Count);
            foreach (KeyValuePair <int, MyMeshPartInfo> pair in dict)
            {
                MyMeshPartInfo meshInfo = pair.Value;
                meshInfo.Export(m_writer);
            }


            return(true);
        }
예제 #2
0
        /// <summary>
        /// ReadMeshParts
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        private List <MyMeshPartInfo> ReadMeshParts(BinaryReader reader)
        {
            List <MyMeshPartInfo> list = new List <MyMeshPartInfo>();
            int nCount = reader.ReadInt32();

            for (int i = 0; i < nCount; ++i)
            {
                MyMeshPartInfo meshPart = new MyMeshPartInfo();
                meshPart.Import(reader);
                list.Add(meshPart);
            }

            return(list);
        }