Пример #1
0
    private void ShowPlayerToPassTo()
    {
        List <Player> players = mRestaurantScript.getAlivePlayers();

        Debug.Log("PLAYER COUNT: " + players.Count);
        //In the future the text could be flashing or something :D
        mPassText.text = "PASS TO " + players[mTurnManagerScript.GetCurrentPlayerIndex()].getName().ToUpper() + " SO THEY CAN SEE THEIR ROLE.";
    }
Пример #2
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);
            }
        }
    }
Пример #3
0
    void Start()
    {
        mTurnManagerScript = GameManagerScript.GetInstance().GetComponent <TurnManagerScript>();
        mRestaurantScript  = GameManagerScript.GetInstance().GetComponent <RestaurantScript>();

        List <Player> players = mRestaurantScript.getAlivePlayers();

        if (mTurnManagerScript.GetCurrentPlayerIndex() <= players.Count - 1)
        {
            ShowPlayerToPassTo();
        }
    }
Пример #4
0
    private void ShowUsername()
    {
        List <Player> players = mRestaurantScript.getAlivePlayers();

        Debug.Log("PLAYER COUNT: " + players.Count);

        mUsernameText.text = players[mTurnManagerScript.GetCurrentPlayerIndex()].getName();
    }