Ejemplo n.º 1
0
    public void OnConfirmButtonClicked()
    {
        List <Player>  players = mRestaurantScript.getAlivePlayers();
        EnumPlayerRole role    = players[mTurnManagerScript.GetCurrentPlayerIndex()].getRole();

        //requires the player to click the button three times if their role doesn't have them clicking otherwise
        if ((role == EnumPlayerRole.CHEMIST || role == EnumPlayerRole.FOOD_CRITIC || role == EnumPlayerRole.PARTY_GOER ||
             role == EnumPlayerRole.WEALTHY_COUPLE || role == EnumPlayerRole.SCAPEGOAT) &&
            mClickTracker > 1)
        {
            mClickTracker--;
            RandomizeActionButtonLocation();
        }
        else
        {
            mClickTracker = 3;
            mActionButton.transform.position = mActionButtonLocation;

            DeactivateButtons();

            if (mTurnManagerScript.GoToNextPlayer())
            {
                SceneManager.LoadScene(DinnerPartyScenes.PASS_PATH);
            }
            else
            {
                SceneManager.LoadScene(DinnerPartyScenes.START_GAME_PATH);
            }
        }
    }
Ejemplo n.º 2
0
    public void OnConfirmButtonClicked()
    {
        DeactivateButtons();

        if (mTurnManagerScript.GoToNextPlayer())
        {
            SceneManager.LoadScene(DinnerPartyScenes.PASS_PATH);
        }
        else
        {
            SceneManager.LoadScene(DinnerPartyScenes.START_GAME_PATH);
        }
    }