Inheritance: IBinarySerializable
コード例 #1
0
        /// <inheritdoc/>
        public void LoadBinaryData(byte[] inData)
        {
            using var ms = new MemoryStream(inData);
            using var br = new BinaryReader(ms);
            var fogInstanceCount = inData.Length / FogInstance.GetSize();

            for (var i = 0; i < fogInstanceCount; ++i)
            {
                FogInstances.Add(new FogInstance(br.ReadBytes(FogInstance.GetSize())));
            }
        }
コード例 #2
0
ファイル: ModelFog.cs プロジェクト: westerjn/libwarcraft
 public void LoadBinaryData(byte[] inData)
 {
     using (MemoryStream ms = new MemoryStream(inData))
     {
         using (BinaryReader br = new BinaryReader(ms))
         {
             int fogInstanceCount = inData.Length / FogInstance.GetSize();
             for (int i = 0; i < fogInstanceCount; ++i)
             {
                 this.FogInstances.Add(new FogInstance(br.ReadBytes(FogInstance.GetSize())));
             }
         }
     }
 }