private void Update() { if (wave >= 2 && gameStat == gameStat.play) { gameStat = gameStat.win; finish.makeFinishRound(); canNextLvl = true; } else { // this is for next round if (Enemy.Count <= 0 && EnemyList.Count <= 0) { gameStat = gameStat.nextWave; } if (gameStat == gameStat.nextWave) { nextWave(); makesEnemy(); StartGame = false; startRound.GetComponent <startRoundController>().satrtAgian(); gameStat = gameStat.play; } // this for start game if (EnemyList.Count <= 0 && StartGame) { StartCoroutine(instantiateEnemy()); } } }
public void nextWave() { wavelvl++; wave++; enemisePerSpawn += (wave * 2); totalEnemies += (wave * 2); maxEnemisOnScreen += (wave * 2); gameStat = gameStat.play; WaveLbl.text = ("Wave " + wavelvl + "/5"); }
public void resetLvl() { wavelvl = 0; wave = 0; gameStat = gameStat.play; lvls = dataController.lvl; StartGame = false; // showList(); choselvl(dataController.lvl); startRounds(); // WaveLbl.text = ("Wave " + wavelvl + "/5"); }