示例#1
0
文件: YkdFile.cs 项目: kidaa/Pulse
 public void ReadFromStream(Stream stream)
 {
     Header = stream.ReadContent<YkdHeader>();
     Background = stream.ReadContent<YkdBlock>();
     Offsets = stream.ReadContent<YkdOffsets>();
     Blocks = new YkdBlock[Offsets.Count];
     for (int i = 0; i < Blocks.Length; i++)
     {
         stream.SetPosition(Offsets[i]);
         Blocks[i] = stream.ReadContent<YkdBlock>();
     }
     Resources = stream.ReadContent<YkdResources>();
 }
示例#2
0
 public void ReadFromStream(Stream stream)
 {
     Header     = stream.ReadContent <YkdHeader>();
     Background = stream.ReadContent <YkdBlock>();
     Offsets    = stream.ReadContent <YkdOffsets>();
     Blocks     = new YkdBlock[Offsets.Count];
     for (int i = 0; i < Blocks.Length; i++)
     {
         stream.SetPosition(Offsets[i]);
         Blocks[i] = stream.ReadContent <YkdBlock>();
     }
     Resources = stream.ReadContent <YkdResources>();
 }