void Awake() { players = new List <Player>(); if (maxNumPlayersOverride.HasValue) { maxNumPlayers = maxNumPlayersOverride.Value; } if (maxNumPlayers == 1) { waitMessage = "Initializing"; } PhotonNetwork.autoCleanUpPlayerObjects = false; if (waitForAllPlayers) { PauseManager.instance.Pause(); } else { StartGame(); } try{ indexer = GameObject.FindObjectOfType <PlayerRoomIndexing>(); indexer.OnRoomIndexingChanged.AddListener(UpdatePlayers); playersParent = new GameObject("Players"); } catch (Exception) {} }
// Token: 0x06000164 RID: 356 RVA: 0x0000A34B File Offset: 0x0000854B private void OnDisable() { this.isInitialized = false; if (PlayerRoomIndexing.instance != null) { PlayerRoomIndexing instance = PlayerRoomIndexing.instance; instance.OnRoomIndexingChanged = (PlayerRoomIndexing.RoomIndexingChanged)Delegate.Remove(instance.OnRoomIndexingChanged, new PlayerRoomIndexing.RoomIndexingChanged(this.ApplyColor)); } }
// Token: 0x06000163 RID: 355 RVA: 0x0000A2FC File Offset: 0x000084FC private void Init() { if (!this.isInitialized && PlayerRoomIndexing.instance != null) { PlayerRoomIndexing instance = PlayerRoomIndexing.instance; instance.OnRoomIndexingChanged = (PlayerRoomIndexing.RoomIndexingChanged)Delegate.Combine(instance.OnRoomIndexingChanged, new PlayerRoomIndexing.RoomIndexingChanged(this.ApplyColor)); this.isInitialized = true; } }
private void Init() { if (!this.isInitialized && PlayerRoomIndexing.instance != null) { PlayerRoomIndexing expr_20 = PlayerRoomIndexing.instance; expr_20.OnRoomIndexingChanged = (PlayerRoomIndexing.RoomIndexingChanged)Delegate.Combine(expr_20.OnRoomIndexingChanged, new PlayerRoomIndexing.RoomIndexingChanged(this.Refresh)); this.isInitialized = true; } }
private void OnDisable() { PlayerRoomIndexing expr_05 = PlayerRoomIndexing.instance; expr_05.OnRoomIndexingChanged = (PlayerRoomIndexing.RoomIndexingChanged)Delegate.Remove(expr_05.OnRoomIndexingChanged, new PlayerRoomIndexing.RoomIndexingChanged(this.Refresh)); }