IEnumerator _ImpHost() { if (inHosting && Network.isServer) { yield return StartCoroutine(updateSelfHost()); if (failedRequest) yield return StartCoroutine( _SentRegisterInfo()); } else { updateSelfHostTimer.endTimer(); updateSelfHostTimer = null; } }
IEnumerator _RegisterHost() { yield return StartCoroutine( _SentRegisterInfo()); if (inHosting) { yield return new WaitForSeconds(autoUpdateSelf); updateSelfHostTimer = gameObject.AddComponent<zzTimerCoroutine>(); updateSelfHostTimer.setInterval(autoUpdateSelf); updateSelfHostTimer.setImpFunction(_ImpHost); } }
void createAutoRequest() { requestHostTimer = gameObject.AddComponent<zzTimerCoroutine>(); requestHostTimer.setInterval(autoRequestInterval); requestHostTimer.setImpFunction(_RequestHostList); }