public void ResetAtSize(Size size) { var allBlocks = blocksRepository.StreamBlocks().ToList(); foreach (var block in allBlocks) { try { RemoveAndDestroyBlock(block); } catch { Debug.Log("Not all blocks were successfully destroyed"); } } blocksRepository.RemoveAll(); blocksRepository = new BlocksRepository(); // TODO Fix issue where houses won't spawn when got farms and when has Destroyed world with meteor at least once // TODO Make it possible to spawn multiple big houses again // TODO Make big houses have a LARGE negative impact on Nature score // TODO Make world a lot bigger -> Make more clouds? Create clouds from soaking up water? // TODO Navigation using hand controls.. how? // TODO Debug performance issues -> Try replacing houses with low poly meshes! Try run some profiler? Maybe some cached matrix of all blocks and all it's different lookup variants? StartCoroutine(CreateWorldAsync()); IEnumerator CreateWorldAsync() { yield return(CreateWorld(SizeToDimensions(size))); } }
public BlocksService(BlocksRepository repo) { _repo = repo; }