protected void OnTriggerExit(Collider other) { var caveTransformTracker = other.GetComponent <CaveTransformTracker>(); if (object.ReferenceEquals(caveTransformTracker, this.currentCaveTransformTracker)) { this.currentCaveTransformTracker = null; } }
protected void OnTriggerEnter(Collider other) { if (this.currentCaveTransformTracker == null) { var caveTransformTracker = other.GetComponent <CaveTransformTracker>(); if (caveTransformTracker != null) { this.currentCaveTransformTracker = caveTransformTracker; } } }