/// <summary> /// Update the raxCounter's timer /// </summary> /// <param name="time">update the timer by this time</param> public void UpdateTimer(float time) { spawnTimer -= time; //timer is up if (spawnTimer <= 0) { //spawn the wave rax.SpawnWave(); //reset timer spawnTimer = spawnRate; } timerText.text = ((int)spawnTimer).ToString(); }