private void Start() { _gridSize = new Vector3Int(30, 1, 24); MainGrid = new VoxelGrid(_gridSize, _voxelSize, transform.position, true, false); _boundaries = MainGrid.Boundaries; _gridGO = MainGrid.GridGO; _gridGO.transform.SetParent(transform); //_cameraPivot.position = MainGrid.Origin + (new Vector3(_gridSize.x / 2f, _gridSize.y, _gridSize.z / 2f) * _voxelSize); //Load tenants and requests data _tenants = JSONReader.ReadTenantsWithPreferences($"Input Data/U_TenantPreferences {TenantFile}", MainGrid); _spaceRequests = JSONReader.ReadSpaceRequests("Input Data/U_SpaceRequests", _tenants); InitializeTenantDisplay(); //Create Configurable Parts PopulateRandomConfigurables(_nComponents); PopulateAgentsList(); AnalyzeGridCreateNewSpaces(); //RenameSpaces(); RenewSpacesMesseges(); //SendSpacesData(); StartCoroutine(DailyProgression()); //UpdateSpeedDisplay(); SetAreaModel(); }
void Start() { _cam = Camera.main; CreateGridFromFile(); //Load tenants and requests data _tenants = JSONReader.ReadTenantsWithPreferences("Input Data/U_TenantPreferences", _grid); _spaceRequests = JSONReader.ReadSpaceRequests("Input Data/U_SpaceRequests", _tenants); _cameraPivot.position = new Vector3(_gridSize.x / 2, 0, _gridSize.z / 2) * _voxelSize; }
// //Unity Specific Methods // void Start() { _cam = Camera.main; if (!_testMode) { if (_bigGrid) { _gridSize = new Vector3Int(40, 1, 82); _grid = new VoxelGrid(_gridSize, _voxelSize, Vector3.zero); _slabFile = "Input Data/BigSlab"; _structureFile = "StructureParts_BigSlab"; } else { _gridSize = new Vector3Int(20, 1, 45); _grid = new VoxelGrid(_gridSize, _voxelSize, Vector3.zero); _slabFile = "Input Data/SmallSlab"; _structureFile = "Input Data/StructureParts_SmallSlab"; } } else { _gridSize = new Vector3Int(20, 1, 45); _grid = new VoxelGrid(_gridSize, _voxelSize, Vector3.zero); _slabFile = "Input Data/TestingData/SlabStates"; _structureFile = "Input Data/TestingData/Structure"; string configurablesFile = "Input Data/TestingData/Configurables"; string spacesFile = "Input Data/TestingData/Spaces"; //string knotsFile = "Input Data/TestingData/Knots"; ReadConfigurables(configurablesFile); ReadSpaces(spacesFile); //ReadKnots(knotsFile); } _tenants = JSONReader.ReadTenantsWithPreferences("Input Data/U_TenantPreferences", _grid); _spaceRequests = JSONReader.ReadSpaceRequests("Input Data/U_SpaceRequests", _tenants); _cameraPivot.position = new Vector3(_gridSize.x / 2, 0, _gridSize.z / 2) * _voxelSize; //Read CSV to create the floor CSVReader.SetGridState(_grid, _slabFile); //Read JSON to create structural parts ReadStructure(_structureFile); //Start the daily progression coroutine if (_testMode) { StartCoroutine(DailyProgression()); } }
private void Start() { _cam = Camera.main; _gridSize = new Vector3Int(30, 1, 24); MainGrid = new VoxelGrid(_gridSize, _voxelSize, transform.position, true, true); _boundaries = MainGrid.Boundaries; _gridGO = MainGrid.GridGO; _gridGO.transform.SetParent(transform); //Load tenants and requests data _tenants = JSONReader.ReadTenantsWithPreferences("Input Data/U_TenantPreferences 01", MainGrid); _spaceRequests = JSONReader.ReadSpaceRequests("Input Data/U_SpaceRequests", _tenants); CreateBlankConfigurables(); }