/*Everything related to creating the dungeon itself */ void Awake() { newEnemyWeights = new Dictionary<string, int>(); newEnemyWeights.Add("aggressive", 3); newEnemyWeights.Add("smart", 3); newEnemyWeights.Add("turret", 1); newEnemyWeights.Add("zombie", 2); newEnemyWeights.Add("worm", 2); Application.targetFrameRate = 60 ; QualitySettings.vSyncCount = 0; scale = Accessiblescale; stage = new Stage(floorMaterials, wallMaterials, FBuilder); //TODO: place rooms first. stage._addRooms(); stage.PlaceHalls(); stage.createDoors(); stage.removeDeadEnds(); stage.Create(); spawnPlayer(); Player = GameObject.FindWithTag("Player").transform; maxEnemies = (Player.gameObject.GetComponent<PlayerController>().getCurrentFloor() + 1) * enemiesPerLevel; numEnemies = 0; enemyWeights = new float[6, 3]; enemyWeights[0, 0] = 0.5f; enemyWeights[0, 1] = 1f; enemyWeights[0, 2] = 0; enemyWeights[1, 0] = 0.4f; enemyWeights[1, 1] = 0.8f; enemyWeights[1, 2] = 1f; enemyWeights[2, 0] = 0.35f; enemyWeights[2, 1] = 0.7f; enemyWeights[2, 2] = 1f; enemyWeights[3, 0] = 0.35f; enemyWeights[3, 1] = 0.7f; enemyWeights[3, 2] = 1f; enemyWeights[4, 0] = 0.35f; enemyWeights[4, 1] = 0.7f; enemyWeights[4, 2] = 0.3f; enemyWeights[5, 0] = 0.35f; enemyWeights[5, 1] = 0.35f; enemyWeights[5, 2] = 0.3f; pool = GameObject.Find("ObjectPool").GetComponent<ObjectPooling>(); }