// Use this for initialization void Awake() { if (ClientUIOverlord.hasLoaded) { return; } CurrentGame.init(gameConnector); CurrentTournament.init(); Game.ClientPlayersHandler.addUIStateListner(); }
public virtual void initPreGameLobby(Sprite gameSprite, PreGameRoomMsg roomInfo) { gameObject.SetActive(true); gameCreator.setCurrentPreLobby(this); this.type = roomInfo.specs.type; this.roomId = roomInfo.specs.roomID; this.currentPlayers = roomInfo.players; this.gameImage.sprite = gameSprite; this.gameTitle.SetText(roomInfo.specs.type.ToString()); this.quitButton.SetActive(roomInfo.specs.isInTournament == false); isAdmin = roomInfo.specs.hostName == ClientUIOverlord.getCurrentAcountInfo().Username; setPlayerSlots(roomInfo.players); setAdminValues(isAdmin); extractLocalPlayerSlotId(roomInfo.players); loginTCPUI.startServerClicked(true); handlers.Add(Msf.Connection.SetHandler((short)ServerCommProtocl.UpdatePreGame, updatePreGameLobby)); CurrentGame.setNewCurrentPreGame(roomInfo.specs); }