Beispiel #1
0
    void Start()
    {
        turnManagerScript = GameManagerScript.GetInstance().GetComponent <TurnManagerScript>();
        players           = turnManagerScript.getPlayers();

        if (turnManagerScript.getCurrentPlayerIndex() <= players.Count - 1)
        {
            ShowPlayerToPassTo();
        }
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        turnManagerScript = GameManagerScript.GetInstance().GetComponent <TurnManagerScript>();
        players           = turnManagerScript.getPlayers();

        ShowUsername();
        //In the future we can add cool artwork here for each role and stuff.
        ShowRoleText();

        PerformRoleAction();
    }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        turnManagerScript = GameManagerScript.GetInstance().GetComponent <TurnManagerScript>();
        players           = turnManagerScript.getPlayers();

        mUserButtonPrefab = Resources.Load <Button>("UserButton");

        mPlayerButtons = new Dictionary <Player, Button>();

        ShowUsername();
        //In the future we can add cool artwork here for each role and stuff.
        ShowRole();

        //PerformRoleAction();
    }
Beispiel #4
0
    public void OnUserSelected(Button pressButton)
    {
        List <Player> players = turnManagerScript.getPlayers();

        foreach (KeyValuePair <Player, Button> entry in mPlayerButtons)
        {
            if (pressButton == entry.Value)
            {
                switch (players[turnManagerScript.getCurrentPlayerIndex()].getRole())
                {
                case EnumPlayerRole.ASSASSIN:
                    turnManagerScript.setPoisonPlayer(entry.Key);
                    Debug.Log("POISONED: " + entry.Key.getName());
                    break;

                case EnumPlayerRole.DISTANT_COUSIN:
                    turnManagerScript.setMarkedPlayer(entry.Key);
                    Debug.Log("MARKED: " + entry.Key.getName());
                    break;
                }
            }
        }
    }