protected void Update() { switch (this.mapState) { case CoopPeerStarter.MapState.Begin: { CoopPlayerCallbacks.ClearTrees(); LoadAsync async = this.GetAsync(); if (async) { async.gameObject.SetActive(true); this.mapState = CoopPeerStarter.MapState.Loading; } break; } case CoopPeerStarter.MapState.Loading: if (!this.GetAsync() || this.GetAsync().isDone) { this.mapState = CoopPeerStarter.MapState.Done; } break; case CoopPeerStarter.MapState.Done: { BoltNetwork.UpdateSceneObjectsLookup(); Camera componentInChildren = base.GetComponentInChildren<Camera>(); if (componentInChildren) { componentInChildren.enabled = false; } base.StartCoroutine(this.LoadingDone()); this.mapState = CoopPeerStarter.MapState.Playing; break; } } }
protected void Update() { CoopPeerStarter.MapState mapState = this.mapState; if (mapState != CoopPeerStarter.MapState.Begin) { if (mapState != CoopPeerStarter.MapState.Loading) { if (mapState == CoopPeerStarter.MapState.Done) { try { BoltNetwork.UpdateSceneObjectsLookup(); } catch (Exception) { } Camera componentInChildren = base.GetComponentInChildren <Camera>(); if (componentInChildren) { componentInChildren.enabled = false; } base.StartCoroutine(this.LoadingDone()); this.mapState = CoopPeerStarter.MapState.Playing; } } else if (!this.GetAsync() || this.GetAsync().isDone) { this.mapState = CoopPeerStarter.MapState.Done; } } else { CoopPlayerCallbacks.ClearTrees(); LoadAsync async = this.GetAsync(); if (async) { async.gameObject.SetActive(true); this.mapState = CoopPeerStarter.MapState.Loading; } } }