static private void createModulesFill() { Debug.LogWarning("Searching for modules that match the level array..."); if (errorStatus) { return; } //MODULES for (int x = 0; x < cols.value; x++) { for (int y = 0; y < rows.value; y++) { if (levelArray[x, y].type != (int)eDGModuleType.NONE) { DGModuleDefinition module; //SEARCH module = DGMPathsController.find(levelArray[x, y]); //RESULT if (module.type == (int)eDGModuleType.NONE) { Debug.LogError("A module cannot be found for a specific combination!\nPosition x: " + x + " y:" + y); } else { levelArray[x, y] = module; } } } } Debug.Log("Level filled!"); }
//### RENDER ### static private void renderLevel() { //LOAD DGMPathsController.load(); //MODULES (PATHS, ACCESSES, POINTS) for (int x = 0; x < cols.value; x++) { for (int y = 0; y < rows.value; y++) { if (levelArray[x, y].type == (int)eDGModuleType.PATH || levelArray[x, y].type == (int)eDGModuleType.ACCESS || levelArray[x, y].type == (int)eDGModuleType.POINT) { DGMPathsController.place(levelArray[x, y].index, x, y, levelArray[x, y].rotation); } } } }