/// <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()))); } }
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()))); } } } }