public void EndDialogue() { transmission = null; nodeIndex = 0; inDialogue = false; delay = 0; commLightSwitcher.SetSprite(1); UpdateTextDisplay(); }
void OnTriggerEnter2D(Collider2D triggerCollider) { Debug.Log(gameObject.name + " colliding with trigger."); transmitting = true; commLightSwitcher.SetSprite(2); timer = 0; distance = Vector3.Distance(circleCollider.transform.position, triggerCollider.transform.position); Debug.Log(distance); UpdateProximity(distance); Debug.Log(proximity); if (hasText) { controller.SetTextOneOff(Transmission.incomingTransmission, true); } if (hasAudio) { audioSource.volume = minVolume + proximity * (maxVolume - minVolume); audioSource.Play(); if (!hasText) { controller.SetTextOneOff(Transmission.streamingAudioTransmission, true); } } }