Exemple #1
0
    void CloseIfLastCard()
    {
        _receiveSuggestion.gameObject.SetActive(false);
        if (_stackCard.Count == 0)
        {
            _imgBg.enabled = false;
            for (var i = 0; i < transform.childCount; ++i)
            {
                transform.GetChild(i).gameObject.SetActive(false);
            }
        }
        else
        {
            if (ReceiveSuggestion.QueueLoc.Count > 0)
            {
                _receiveSuggestion.gameObject.SetActive(false);
                ReceiveSuggestion.ShowSuggestion(ReceiveSuggestion.QueueLoc.Dequeue());
            }
        }

        if (_done)
        {
            return;
        }
        print(_listCard.Count);
        if (_listCard.Count == 0)
        {
            _done = true;
            print("_countNo " + _countNo);
            if (_countNo == _initialNumCards)
            {
                _makeSuggestion.gameObject.SetActive(true);
            }
            else
            {
                PlayerControl.Local.CompleteChoice();
            }
        }
    }
Exemple #2
0
    void RpcSendSuggestion(string s, string desc)
    {
        EatLocation location;

        if (!EatLocation.Presets.TryGetValue(s, out location))
        {
            location = new EatLocation(s, desc);
        }
        VoteTracker.AddVote(location);
        VotesWindow.singleton.RefreshVotes();

        foreach (var player in Players)
        {
            if (player != this)
            {
                ++player.remainingSuggestions;
            }
        }
        if (!isLocalPlayer)
        {
            ReceiveSuggestion.ShowSuggestion(location);
        }
    }
 void OnDestroy()
 {
     _instance = null;
     QueueLoc.Clear();
 }
 void Awake()
 {
     _instance     = this;
     _cardstartPos = _card.transform.position;
     gameObject.SetActive(false);
 }