private void OnRegionDone(Region region) { lock (this.pingerList) { if (this.IsPinging == false) { return; } this.bestRegionCache = null; foreach (RegionPinger pinger in this.pingerList) { if (!pinger.Done) { return; } } this.IsPinging = false; } this.onCompleteCall(this); #if PING_VIA_COROUTINE MonoBehaviourEmpty.SelfDestroy(); #endif }
private void OnPreferredRegionPinged(Region preferredRegion) { if (preferredRegion.Ping > this.previousPing * 1.50f) { this.PingEnabledRegions(); } else { this.IsPinging = false; this.onCompleteCall(this); #if PING_VIA_COROUTINE MonoBehaviourEmpty.SelfDestroy(); #endif } }