public override void join(bool choice) { joined[turn] = choice; if (PhotonNetwork.player.ID != turn + 1) { pop.EnableJoinBlockScreen(turn, choice); } else { pop.EnableWaitScreen(); } HandleTextFile.WriteLog((GameControler.LogLine += 1) + " Player " + (turn + 1) + "'s choice has been shown to other players, #BNF-30", GameControler.SName); turnsPassed++; TurnOrder(); SetGlow(turn); pop.EnableTournamentBlockScreen(players[turn], turn); if (choice == true) { joinedPlayers++; } HandleTextFile.WriteLog((GameControler.LogLine += 1) + " Action Log: Player " + (turn + 1) + " Joins the Tournament : " + choice + ", #BNF-30", GameControler.SName); if (turnsPassed > 3) { Start(); } //AI Logic if (players[turn].GetComponent <AiPlayer>() != null) { AiPlayer temp = players[turn].GetComponent <AiPlayer>(); temp.JoinTournament(players, Reward, this); } }
public void CreateTournement(List <Hand> h, List <GameObject> p, Deck d, Deck DiscardDeck, List <Dropzone> dz, int t, GameControler master, int Bonus, Card Tc) { HandleTextFile.WriteLog((GameControler.LogLine += 1) + " Action Log: Create New Tournament Started ", GameControler.SName); turn = t; for (int i = 0; i < 4; i++) { joined.Add(false); } for (int i = 0; i < 4; i++) { joined2.Add(false); } playerWhoDrewTheCard = t; Reward = Bonus; DisableAllDropZones(); DisableAllHands(); pop.EnableTournamentStartPopup((TournamentCard)Tc); ifDisplay.setText(UpdateInfo(0)); turnsPassed = 0; gameState = true; boardUI.SetActive(true); SetGlow(t); for (int i = 0; i < dzones.Count; i++) { dzones[i].GetComponent <Dropzone>().Type = "TZone"; } if (PhotonNetwork.player.ID != turn + 1) { pop.EnableTournamentBlockScreen(players[turn], turn); } if (players[turn].GetComponent <AiPlayer>() != null) { AiPlayer temp = players[turn].GetComponent <AiPlayer>(); temp.JoinTournament(players, Reward, this); } }