private void Trigger() { if (eventToTrigger != null) { eventToTrigger.Trigger(); } }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { player.position = objToTeleportTo.position; if (eventToTrigger != null) { eventToTrigger.Trigger(); } } }