// Update is called once per frame void FixedUpdate() { if (spawn == true) { if (ScoreSystem.shouldSpawnEnemyCube[ScoreSystem.i - 1] == 1) { if (x >= level) { Ispawner.SpawnEnemy(box); x = 0; ScoreSystem.spawnCounter++; } else { x += 1; } } else if (ScoreSystem.shouldSpawnBigmama[ScoreSystem.i - 1] == 1) { if (x >= level) { Ispawner.SpawnEnemy(bigMama); x = 0; ScoreSystem.spawnCounter++; } else { x += 1; } } } }
void SetLevel() { xyz = scores.Length; if (i <= xyz) { if (count <= scores[i - 1]) { countText.text = "Count: " + count.ToString() + " / " + scores[i - 1].ToString(); if (spawnCounter < scores[i - 1]) { CannonHeal.multipleDamage = 1.2f; enemy.spawn = true; enemy.level = spawnSpeed[i - 1]; IlevelText(); levelText.text = "Level" + i; } if (spawnCounter == scores[i - 1]) { enemy.spawn = false; IlevelText(); } if (count == scores[i - 1]) { enemy.spawn = true; player_level_up.Play(); timer = 0; i++; ingameBGM.next = true; } } //Infinity mode } else { countText.text = "Count: " + count.ToString(); IlevelText(); levelText.text = "Infinity mode!!"; CannonHeal.multipleDamage = 2.5f; if (otc >= overtimeCount) { Ispawner.SpawnEnemy(bigmama); otc = 0; } else { otc++; } } }