// Set listeners and assign private variables when the game starts. void Start() { shouldAttemptRejoin = true; Instance = this; mainMenuManager = GetComponent <MainMenuManager>(); championSelect = GetComponent <ChampionSelect>(); mapManager = GetComponent <MapManager>(); gameHandler = GetComponent <GameHandler>(); searchingLabel = SearchingLabel.Instance; cancelButton.onClick.AddListener(StopPlay); }
// Called by Photon when the user joins a room void OnJoinedRoom() { searchingLabel = SearchingLabel.Instance; searchingLabel.OnSearchingStart(); // Obsolete: disconnect and reconnect handling if (isRejoined) { GameHandler.Instance.currentMap = MapManager.Instance.GetMap((string)PhotonNetwork.room.CustomProperties["m"]); isRejoined = false; } }
// Allow other scripts to reference this when the game starts void Start() { Instance = this; }