void BoardSetup() { spawnWave = new Wave(); boardHolder = new GameObject("Board").transform; for (int x = 0; x < columns; x++) { for (int y = 0; y < rows; y++) { GameObject toInstantiate = floorTiles[Random.Range(0, floorTiles.Length)]; // Outside of the level if (x == 0 || x == columns - 1 || y == 0 || y == rows - 1) { toInstantiate = outerWallTiles[Random.Range(0, outerWallTiles.Length)]; } GameObject instance = Instantiate(toInstantiate, new Vector3(x, y, 0f), Quaternion.identity) as GameObject; instance.transform.SetParent(boardHolder); } } renderPedestals(); spawnWave = new Wave(); }
// Entry Point public void SetupScene(int level) { spawnPosition = GameObject.FindGameObjectWithTag("Entrance").transform.position; spawnWave = new Wave(); // InitializeList(); // BoardSetup(); }