public async Task <ISector> GenerateDungeonAsync(ISectorSubScheme sectorScheme) { var map = await _mapFactory.CreateAsync(sectorScheme); var sector = new Sector(map, _actorManager, _propContainerManager, _dropResolver, _schemeService, _equipmentDurableService); return(sector); }
/// <summary> /// Создаёт экземпляр сектора подземелий с указанными параметрами. /// </summary> /// <param name="sectorScheme"> Схема генерации сектора. </param> /// <returns> Возвращает экземпляр сектора. </returns> public async Task <ISector> GenerateDungeonAsync(ISectorSubScheme sectorScheme) { var map = await _mapFactory.CreateAsync(sectorScheme); var sector = _sectorFactory.Create(map); var monsterRegions = map.Regions.Where(x => !x.IsStart).ToArray(); _monsterGenerator.CreateMonsters(sector, _monsterPlayer, monsterRegions, sectorScheme); _chestGenerator.CreateChests(map, sectorScheme, monsterRegions); return(sector); }
public async Task <ISector> GenerateAsync(ISectorNode sectorNode) { var sectorFactoryOptions = new SectorMapFactoryOptions(sectorNode.SectorScheme.MapGeneratorOptions); var map = await _mapFactory.CreateAsync(sectorFactoryOptions); var actorManager = new ActorManager(); var staticObjectManager = new StaticObjectManager(); var sector = new Sector(map, actorManager, staticObjectManager, _dropResolver, _schemeService, _equipmentDurableService); return(sector); }