當前位置: 首頁>>代碼示例>>C#>>正文


C# BinaryReader.ReadStructs方法代碼示例

本文整理匯總了C#中System.IO.BinaryReader.ReadStructs方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryReader.ReadStructs方法的具體用法?C# BinaryReader.ReadStructs怎麽用?C# BinaryReader.ReadStructs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.IO.BinaryReader的用法示例。


在下文中一共展示了BinaryReader.ReadStructs方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ReadTile

        private TISTile ReadTile(BinaryReader reader, TISDescriptor descriptor)
        {
            var palette = reader.ReadStructs<TISColour>(256);
            var pixels = reader.ReadBytes(descriptor.TileDimensions * 2);

            return new TISTile(palette, pixels, descriptor.TileDimensions);
        }
開發者ID:grofit,項目名稱:Infinity,代碼行數:7,代碼來源:TISPlugin.cs

示例2: ReadDoors

 private IList<WEDDoor> ReadDoors(BinaryReader reader, WEDDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.DoorOffset, SeekOrigin.Begin);
     return reader.ReadStructs<WEDDoor>(descriptor.DoorCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:WEDPlugin.cs

示例3: ReadContainers

 private IList<AREContainer> ReadContainers(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.ContainerOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREContainer>(descriptor.ContainerCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例4: ReadAutomapNotes

 private IList<AREAutomapNote> ReadAutomapNotes(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.AutomapNoteOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREAutomapNote>(descriptor.AutomapNoteCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例5: ReadAnimations

 private IList<AREAnimation> ReadAnimations(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.AnimationOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREAnimation>(descriptor.AnimationCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例6: ReadAmbients

 private IList<AREAmbient> ReadAmbients(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.AmbientSoundOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREAmbient>(descriptor.AmbientSoundCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例7: ReadVertices

 private IList<AREPoint> ReadVertices(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.VerticeOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREPoint>(descriptor.VerticeCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例8: ReadSpawnPoints

 private IList<ARESpawnPoint> ReadSpawnPoints(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.SpawnPointOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARESpawnPoint>(descriptor.SpawnPointCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例9: ReadTiledObjects

 private IList<ARETiledObject> ReadTiledObjects(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.TiledObjectOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARETiledObject>(descriptor.TiledObjectCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例10: ReadRestInterruptions

 private IList<ARERestInterruption> ReadRestInterruptions(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.RestInterruptionOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARERestInterruption>(1);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例11: ReadSongEntries

 private IList<ARESongEntry> ReadSongEntries(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.SongEntryOffset, SeekOrigin.Begin);
     return reader.ReadStructs<ARESongEntry>(1);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例12: ReadProjectileTraps

 private IList<AREProjectileTrap> ReadProjectileTraps(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.ProjectileTrapOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREProjectileTrap>(descriptor.ProjectileTrapCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例13: ReadItems

 private IList<AREItem> ReadItems(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.ItemOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREItem>(descriptor.ItemCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例14: ReadEntrances

 private IList<AREEntrance> ReadEntrances(BinaryReader reader, AREDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.EntranceOffset, SeekOrigin.Begin);
     return reader.ReadStructs<AREEntrance>(descriptor.EntranceCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:AREPlugin.cs

示例15: ReadOverlays

 private IList<WEDOverlay> ReadOverlays(BinaryReader reader, WEDDescriptor descriptor)
 {
     reader.BaseStream.Seek(descriptor.OverlayOffset, SeekOrigin.Begin);
     return reader.ReadStructs<WEDOverlay>(descriptor.OverlayCount);
 }
開發者ID:grofit,項目名稱:Infinity,代碼行數:5,代碼來源:WEDPlugin.cs


注:本文中的System.IO.BinaryReader.ReadStructs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。