Beispiel #1
0
    public void Start()
    {
        bool playerWon  = GameManagerLogic.GetPlayerWon();
        bool twoPlayers = ScoreManager.GetInstance().IsTwoPlayers();
        int  difficulty = ScoreManager.GetInstance().GetGameDifficulty();

        extraHardButton.SetActive(false);
        _option = 0;

        if (twoPlayers || (playerWon && difficulty >= 3))
        {
            if (difficulty == 3)
            {
                extraHardButton.SetActive(true);
            }
            actionText.text = "MAIN MENU";
            _option         = 1;
        }
        else if (playerWon)
        {
            actionText.text = "CONTINUE";
            _option         = 2;
        }
        else
        {
            actionText.text = "RETRY";
            _option         = 3;
        }
    }
Beispiel #2
0
 public void LoadReferee(Vector3 eastCourtSide, Vector3 westCourtSide,
                         Vector3 southCourtSide, Vector3 northCourtSide, GameObject southServiceWall,
                         GameObject southEastServiceWall, GameObject southWestServiceWall,
                         GameObject southMiddleServiceWall, GameObject northServiceWall,
                         GameObject northEastServiceWall, GameObject northWestServiceWall,
                         GameObject northMiddleServiceWall, Vector3 southServiceDelimiter,
                         Vector3 eastServiceDelimiter, Vector3 westServiceDelimiter,
                         Vector3 northServiceDelimiter, PlayerLogic player1, AIPlayer Aiplayer,
                         Player2Logic player2, GameManagerLogic gameManagerLogic)
 {
     _gameManagerLogic = gameManagerLogic;
     _referee          = new Referee(eastCourtSide, westCourtSide, southCourtSide, northCourtSide,
                                     southServiceWall, southEastServiceWall, southWestServiceWall,
                                     southMiddleServiceWall, northServiceWall, northEastServiceWall,
                                     northWestServiceWall, northMiddleServiceWall, southServiceDelimiter,
                                     eastServiceDelimiter, westServiceDelimiter, northServiceDelimiter,
                                     player1, Aiplayer, player2, _twoPlayers, _difficulty);
 }
Beispiel #3
0
        public void Start()
        {
            bool playerWon = GameManagerLogic.GetPlayerWon();

            if (ScoreManager.GetInstance().IsTwoPlayers())
            {
                endGameText.text = playerWon ? "Player 1 Wins!" : "Player 2 Wins!";
            }
            else
            {
                if (ScoreManager.GetInstance().GetGameDifficulty() == 4 && playerWon)
                {
                    endGameText.text     = "CONGRATULATIONS YOU WON!";
                    endGameText.fontSize = 100.0f;
                }
                else
                {
                    endGameText.text = playerWon ? "You Win!" : "You Lose";
                }
            }
        }