Пример #1
0
 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);
 }
Пример #2
0
        private void StopMoving(bool wonFlag, Racing3DGameModel.GameoverReason stopReason, bool showGameOverUI = true)
        {
            OpponentCar.StopMoving();
            ControllableCar.StopMoving();

            if (showGameOverUI)
            {
                view.ShowGameOverUI(wonFlag, stopReason);
            }
        }
Пример #3
0
        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)
 {
 }
Пример #6
0
 private void StopMoving(bool wonFlag, Racing3DGameModel.GameoverReason stopReason, bool showGameOverUI = true)
 {
 }