示例#1
0
    public void Set(BoardGame.Player player)
    {
        if (null == player)
        {
            Log.Error("not found player");
            return;
        }

        _player = player;

        switch (_player.Owner)
        {
        case BoardGame.Cell.EOwner.User:
            Text.gameObject.SetActive(true);
            _button.interactable = true;
            break;

        case BoardGame.Cell.EOwner.AI:
            Text.gameObject.SetActive(false);
            _button.interactable = false;
            break;

        default:
            Log.Error("invalid player");
            break;
        }
    }
示例#2
0
    public void Set(BoardGame.Player player)
    {
        _player = player;

        int numCard = _cardArray.Length;

        for (int i = 0; i < numCard; ++i)
        {
            _cardArray[i].Set(player);
            _cardArray[i].Hide();
        }
    }
示例#3
0
    public void Set(BoardGame.Player player)
    {
        if (null != PlayerCardListPanel)
        {
            PlayerCardListPanel.Set(player);
        }
        else
        {
            Log.Error("not found player card list panel");
        }

        if (null != DrawCardPanel)
        {
            DrawCardPanel.Set(player);
        }
        else
        {
            Log.Error("not found draw card panel");
        }
    }
示例#4
0
    public void Set(BoardGame.Player player)
    {
        if (null == player)
        {
            Log.Error("not found player");
            return;
        }

        _player = player;

        BoardGamePlayer p = Manager.Instance.DT.BoardGamePlayer[_player.Id];

        setImage(p.idle);

        if (BoardGame.Cell.EOwner.User == _player.Owner)
        {
            RectTransform rect = GetComponent <RectTransform>();
            rect.rotation = new Quaternion(0.0f, 180.0f, 0.0f, 0.0f);
        }
    }
示例#5
0
    public void Set(BoardGame.EValuationBasis valuationBasis, BoardGame.Player player)
    {
        if (null == player)
        {
            Log.Error("not found player");
            return;
        }

        setNameText(player.Name);

        switch (valuationBasis)
        {
        case BoardGame.EValuationBasis.Tricker:
            setTrickerStats(player);
            break;

        case BoardGame.EValuationBasis.Politician:
            setPolticianStats(player);
            break;

        default:
            break;
        }
    }
示例#6
0
    public void Set(BoardGame.Player player)
    {
        _player = player;

        Hide();
    }
示例#7
0
 private void setPolticianStats(BoardGame.Player player)
 {
     _statPanelArray[0].Set(EStat.GRACE, player.Grace);
     _statPanelArray[1].Set(EStat.MORALITY, player.Morality);
     _statPanelArray[2].Set(EStat.GOODNESS, player.Goodness);
 }
示例#8
0
 private void setTrickerStats(BoardGame.Player player)
 {
     _statPanelArray[0].Set(EStat.INTELLECT, player.Intellect);
     _statPanelArray[1].Set(EStat.TACTIC, player.Tactic);
     _statPanelArray[2].Set(EStat.LEADERSHIP, player.Leadership);
 }