public static void OnDisconnectedFromServer() { if (DestroysOnDisconnect.ListClassInitialized && DestroysOnDisconnect.List.all.Count > 0) { DestroysOnDisconnect[] array = DestroysOnDisconnect.List.all.ToArray(); for (int i = 0; i < (int)array.Length; i++) { DestroysOnDisconnect destroysOnDisconnect = array[i]; if (destroysOnDisconnect) { UnityEngine.Object.Destroy(destroysOnDisconnect.gameObject); } } } }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; switch (num) { case 0: this.$current = null; this.$PC = 1; goto Label_0098; case 1: this.$current = null; this.$PC = 2; goto Label_0098; case 2: try { SoundPool.Drain(); } catch (Exception exception) { this.< e > __0 = exception; UnityEngine.Debug.LogException(this.< e > __0); } try { DestroysOnDisconnect.OnDisconnectedFromServer(); } catch (Exception exception2) { this.< e > __1 = exception2; UnityEngine.Debug.LogException(this.< e > __1); } this.$PC = -1; break; } return(false); Label_0098: return(true); }
protected void Awake() { _serverMan = this; UnityEngine.Object.DontDestroyOnLoad(base.gameObject); DestroysOnDisconnect.ApplyToGameObject(base.gameObject); }