public NetworkPlayerBase(GameTable gameTable, MonoNetworkPlayerBase player) : base(gameTable) { unityPlayer = player; uiDeck = GameObject.FindGameObjectWithTag("DECK").GetComponent <UIDeck>(); biddingPopup = GameObject.FindGameObjectWithTag("MENUS").transform.FindChild("BiddingPopup").GetComponent <BiddingPopup>(); }
public void UserJoined(string username, int seat, bool local) { if (local) { networkPlayers[seat] = localPlayer.GetInternalPlayer(); } else { GameObject newPlayer = new GameObject(); newPlayer.transform.parent = transform; newPlayer.name = username; MonoNetworkPlayerBase player = null; player = newPlayer.AddComponent <MonoRemoteNetworkPlayer>(); player.TurnTimeoutHandler = TurnTimeoutHandler; player.gameTable = GameTable; networkPlayers[seat] = player.InitializeNetworkPlayer(); networkPlayers[seat].PlayerName = username; } if (networkPlayers[seat] != null) { SeatPlayer(networkPlayers[seat], seat); } if (IsRoomFilled()) { GameTable.InitializeMultiPlayerGame(MultiplayerManager.CurrentEndCondition, MultiplayerManager.CurrentEndConditionGoal); } }
public RemoteNetworkPlayer(GameTable gameTable, MonoNetworkPlayerBase player) : base(gameTable, player) { }