private void playerTurnChanged(PlayerTurnChangedTo playerTurnChanged) { currentPlayerTurn = playerTurnChanged.playerType; if (CurrentGameMode == GameModes.Online) { timer = maxTimeForTurn; if (playerTurnChanged.playerType == PlayerType.P1) { StopCoroutine(incrementPlayer2Coroutine); StartCoroutine(incrementPlayer1Coroutine); } else { StopCoroutine(incrementPlayer1Coroutine); StartCoroutine(incrementPlayer2Coroutine); } } foreach (Tile tempTile in tiles) { if (tempTile.tileType == PlayerSymbol.Walkable) { tempTile.setPlayerIndicator(playerTurnChanged.playerType); } } }
private void playerTurnChanged(PlayerTurnChangedTo e) { if (e.playerType == playerType) { currentTurn.text = "Your's Turn"; } else { currentTurn.text = "Opponents Turn"; } }
private void onPlayerTurnChanged(PlayerTurnChangedTo e) { if (e.playerType == PlayerType.P1) { player1PowerBlocker.SetActive(false); player2PowerBlocker.SetActive(true); turnText.text = "P1"; turnImage.color = new Color(1, 0.4f, 0.27f, 1); } else { player1PowerBlocker.SetActive(true); player2PowerBlocker.SetActive(false); turnText.text = "P2"; turnImage.color = new Color(0, 0.58f, 1, 1); } }