void Update() { if (timer > 0) { timer -= Time.deltaTime * 1; } else { if (wave) { wave.ContinuePlot(); } } if (betweenWavesTimer > 0) { betweenWavesTimer -= Time.deltaTime * 1; } else if (doNextWave) { curWave++; SaveLevels(); if (curWave >= waves.Length) { EndGame(); return; } waves[curWave].SetActive(true); doNextWave = false; WaveInt.GetComponent <Text>().text = "" + (curWave + 1); } }
void Update() { if (timer > 0) { if (text1 != text2) { counter += Time.deltaTime * 40; text2 = text1.Substring(0, (int)counter); UIText.GetComponent <Text>().text = text2; } else { timer -= Time.deltaTime * 1; audioSource.Stop(); counter = 0; } } else { if (wave) { wave.ContinuePlot(); } } }