void Update() { counter += Time.deltaTime; if (counter > SecondsBeforeInfectedSound && !wasInfectedSoundPlayed) { infectedSound.Play(); wasInfectedSoundPlayed = true; } if (!wasInjectionHintPlayed && counter > SecondsBeforeInjectionHint) { Debug.Log("Play Injection hint!"); InjectionHintSound.Play(); wasInjectionHintPlayed = true; } if (IsPlayerNearGenerator() && !wasAnagramHintPlayed) { anagramHint.Play(); wasAnagramHintPlayed = true; } if (freeZombie == null && !wasdisableGeneratorSoundPlayed) { Debug.Log("Playing Generator Sound"); disableGeneratorSound.Play(); wasdisableGeneratorSoundPlayed = true; anagramsGame.StartGame(); } }