private ResourceManager() { mapGenerator = MapGeneratorManager.GetMapGenerators().First(); chunkSerializer = new ChunkSerializer(); chunkPersistence = new ChunkDiskPersistence(chunkSerializer); _managers = new Dictionary <int, PlanetResourceManager>(); _planets = new[] { loadPlanet(0) }; //planetCache = new Cache<int, IPlanet>(1, loadPlanet, savePlanet); //chunkCache = new Cache<PlanetIndex3, IChunk>(CacheSize, loadChunk, saveChunk); bool.TryParse(ConfigurationManager.AppSettings["DisablePersistence"], out disablePersistence); }
private ResourceManager() { mapGenerator = MapGeneratorManager.GetMapGenerators().First(); chunkSerializer = new ChunkSerializer(); chunkPersistence = new ChunkDiskPersistence(chunkSerializer); _managers = new Dictionary<int, PlanetResourceManager>(); _planets = new[] {loadPlanet(0)}; //planetCache = new Cache<int, IPlanet>(1, loadPlanet, savePlanet); //chunkCache = new Cache<PlanetIndex3, IChunk>(CacheSize, loadChunk, saveChunk); bool.TryParse(ConfigurationManager.AppSettings["DisablePersistence"], out disablePersistence); }
public ChunkDiskPersistence(IChunkSerializer serializer) { this.serializer = serializer; }
public ChunkDiskPersistence(IChunkSerializer serializer) { this.serializer = serializer; }