void Update() { if (!transmitting) { return; } UpdateProximity(distance); if (hasAudio) { audioSource.volume = minVolume + proximity * (maxVolume - minVolume); } if (hasText && proximity > proximityTrigger) { Debug.Log("Starting dialogue."); controller.StartDialogue(transmission); transmitting = false; } timer += Time.deltaTime; if (hasText && timer > advanceDelay) { Debug.Log(proximity); timer = 0; PushNonsenseText(); } }