void Start() { currentPlayer = PlayerAvailable.Player1; gameSettings.InitializePlayerNames(); scoreManager.InitializeScoreCard(gameSettings.playersSelected, gameSettings.playerNames); scoreUI.CleanUpScores(); scoreUI.DisplayPlayerName(currentPlayer); }
public void PlayerDamageHealth_EnterCollider(ColliderBridge bridgeCollider) { PlayerAvailable avPlayer = bridgeCollider.enterCollider.gameObject.GetComponent <PlayerAvailable>(); if (avPlayer != null && !avPlayer.freezePlayerChronometerBool) { avPlayer.GetComponent <IDamage>().ReceiveDamage(200f); } else { bridgeCollider.enterCollider.GetComponent <IDamage>().ReceiveDamage(200f); } }
void MoveToNextPlayer() { switch (gameSettings.playersSelected) { case SettingsManager.GameSettings.PlayersSelection.OnePlayer: currentPlayer = PlayerAvailable.Player1; break; case SettingsManager.GameSettings.PlayersSelection.TwoPlayers: if (currentPlayer == PlayerAvailable.Player1) { currentPlayer = PlayerAvailable.Player2; } else { currentPlayer = PlayerAvailable.Player1; } break; case SettingsManager.GameSettings.PlayersSelection.ThreePlayers: if (currentPlayer == PlayerAvailable.Player1) { currentPlayer = PlayerAvailable.Player2; } else if (currentPlayer == PlayerAvailable.Player2) { currentPlayer = PlayerAvailable.Player3; } else if (currentPlayer == PlayerAvailable.Player3) { currentPlayer = PlayerAvailable.Player1; } break; case SettingsManager.GameSettings.PlayersSelection.FourPlayers: if (currentPlayer == PlayerAvailable.Player1) { currentPlayer = PlayerAvailable.Player2; } else if (currentPlayer == PlayerAvailable.Player2) { currentPlayer = PlayerAvailable.Player3; } else if (currentPlayer == PlayerAvailable.Player3) { currentPlayer = PlayerAvailable.Player4; } else if (currentPlayer == PlayerAvailable.Player4) { currentPlayer = PlayerAvailable.Player1; } break; } scoreUI.UpdateScore(currentPlayer); }