Exemple #1
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;
                }
            }
        }
    }