示例#1
0
 void ISerializable.Serialize(PeRecordWriter w)
 {
     if (w.key == InGameAidArchiveKey)
     {
         w.binaryWriter.Write(InGameAidData.Serialize());
     }
 }
示例#2
0
    public void Export(Pathea.PeRecordWriter w)
    {
        BinaryWriter bw = w.binaryWriter;

        if (bw == null)
        {
            Debug.LogError("On WriteRecord FileStream is null!");
            return;
        }
        _dataSource.Export(bw);
    }
示例#3
0
 void ISerializable.Serialize(PeRecordWriter w)
 {
     if (w.key == ArchiveKeyIdGenerator)
     {
         mRecordEntityIdGen.Export(w.binaryWriter);
     }
     else if (w.key == ArchiveKeyNameGenerator)
     {
         w.Write(mNameGenerater.Export());
     }
 }
示例#4
0
    public void Export(Pathea.PeRecordWriter w)
    {
        if (_tmpVoxelFileStream == null)
        {
            return;
        }

        if (!GameConfig.IsMultiMode)
        {
            SaveChunksInListToTmpFile();
        }

        BinaryWriter bw = w.binaryWriter;

        if (bw == null)
        {
            Debug.LogError("On WriteRecord FileStream is null!");
            return;
        }

        byte[] buff = VFVoxelChunkData.s_ChunkDataPool.Get();
        int    cnt  = _modifiedChunksInfo.Count;

        bw.Write(s_ver);
        bw.Write(cnt);
        _tmpVoxelFileStream.Seek(2 * sizeof(int), SeekOrigin.Begin);
        for (int i = 0; i < cnt; i++)
        {
            _tmpVoxelFileStream.Read(buff, 0, VoxelTerrainConstants.VOXEL_ARRAY_LENGTH_VT);
            bw.Write(buff, 0, VoxelTerrainConstants.VOXEL_ARRAY_LENGTH_VT);
        }
        VFVoxelChunkData.s_ChunkDataPool.Free(buff);

        foreach (KeyValuePair <IntVector4, long> pair in _modifiedChunksInfo)
        {
            IntVector4 key = pair.Key;

            bw.Write(key.x);
            bw.Write(key.y);
            bw.Write(key.z);
            bw.Write(key.w);
            bw.Write(pair.Value);
        }

        if (_addtionalWriter != null)
        {
            _addtionalWriter(bw);
        }
    }
示例#5
0
 void ISerializable.Serialize(PeRecordWriter w)
 {
     if (w.key == VFVoxelTerrain.ArchiveKey)
     {
         //terrain
         VFVoxelTerrain.self.SaveLoad.Export(w);
     }
     else if (w.key == VFVoxelWater.ArchiveKey)
     {
         //water
         VFVoxelWater.self.SaveLoad.Export(w);
     }
     else if (w.key == Bloc45kArchiveKey)
     {
         Block45Man.self.Export(w);
     }
 }
示例#6
0
 void ISerializable.Serialize(PeRecordWriter w)
 {
     if (w.key == TutorialDataArchiveKey)
     {
         w.binaryWriter.Write(TutorialData.Serialize());
     }
     else if (w.key == MetalScanDataArchiveKey)
     {
         w.binaryWriter.Write(MetalScanData.Serialize());
     }
     else if (w.key == MessageDataArchveKey)
     {
         w.binaryWriter.Write(MessageData.Serialize());
     }
     else if (w.key == MonsterHandbookDataArchveKey)
     {
         w.binaryWriter.Write(MonsterHandbookData.Serialize());
     }
 }
示例#7
0
 void Pathea.ISerializable.Serialize(Pathea.PeRecordWriter w)
 {
     w.Write(Export());
 }
示例#8
0
 void Pathea.ISerializable.Serialize(Pathea.PeRecordWriter w)
 {
     w.Write(GetData());
 }
示例#9
0
 void ISerializable.Serialize(PeRecordWriter w)
 {
     WriteData(w.binaryWriter);
 }