/// <inheritdoc />
        public SerializedSkyIslandMapChunk ToPersistable(ISkyIslandMapChunk chunk)
        {
            IChunkPersisterContracts.ToPersistable(chunk);

            return(new SerializedSkyIslandMapChunk(chunk.Key, this.serializer.Serialize(chunk.GetResources())));
        }
        /// <inheritdoc />
        public void FromPersistable(SerializedSkyIslandMapChunk persistable, ISkyIslandMapChunk chunk)
        {
            IChunkPersisterContracts.FromPersistable(persistable, chunk);

            this.serializer.DeserializeInline(persistable.SerializedData, chunk.GetResources());
        }
Пример #3
0
        /// <inheritdoc />
        public SerializedVoxelGridChunk ToPersistable(IVoxelGridChunk chunk)
        {
            IChunkPersisterContracts.ToPersistable(chunk);

            return(new SerializedVoxelGridChunk(chunk.Key, this.serializer.Serialize(chunk.GetResources())));
        }