public void ShowGameOverUI(bool wonFlag, Racing3DGameModel.GameoverReason gameoverReason) { gameoverTitle.text = wonFlag ? wonText : loseText; gameoverSubtitle.text = GetGameoverSubtitle(gameoverReason); gameoverPanel.SetActive(true); header.SetActive(false); nitroRoot.SetActive(false); }
private void StopMoving(bool wonFlag, Racing3DGameModel.GameoverReason stopReason, bool showGameOverUI = true) { OpponentCar.StopMoving(); ControllableCar.StopMoving(); if (showGameOverUI) { view.ShowGameOverUI(wonFlag, stopReason); } }
private string GetGameoverSubtitle(Racing3DGameModel.GameoverReason gameoverReason) { switch (gameoverReason) { case Racing3DGameModel.GameoverReason.FinishRace: return("You've finished the race"); case Racing3DGameModel.GameoverReason.OpponentFinishRace: return("Your opponent has finished the race sooner than you"); case Racing3DGameModel.GameoverReason.HitPowerUp: return("You hit an power up"); case Racing3DGameModel.GameoverReason.OpponentHitPowerUp: return("Your opponent hit an power up"); case Racing3DGameModel.GameoverReason.OpponentLeftRoom: return("Your opponent had left the room"); case Racing3DGameModel.GameoverReason.None: default: return("Unknown"); } }
private string GetGameoverSubtitle(Racing3DGameModel.GameoverReason gameoverReason) { return(null); }
public void ShowGameOverUI(bool wonFlag, Racing3DGameModel.GameoverReason gameoverReason) { }
private void StopMoving(bool wonFlag, Racing3DGameModel.GameoverReason stopReason, bool showGameOverUI = true) { }