Beispiel #1
0
    public void BidNumberClicked(int number)
    {
        Debug.Log("Numer: " + number + " BidNumber:" + bidNumber);
        if (bidNumber != 0)
        {
            SetWhite(numberButtons[bidNumber - 1]);
        }
        SetRed(numberButtons[number - 1]);
        bidNumber = number;
        Debug.Log("Bid number: " + bidNumber);
        if (bidNumber != 0 && bidColor != TrumpColor.undefined)
        {
            actionButtons[3].interactable = true;
        }
        foreach (Button b in colorButtons)
        {
            b.interactable = true;
        }
        if (bidNumber == highestNumber)
        {
            for (int i = 0; i <= (int)highestColor; i++)
            {
                colorButtons[i].interactable = false;
            }
            if (bidColor <= highestColor && bidColor != TrumpColor.undefined)
            {
                SetWhite(colorButtons[(int)bidColor]);
                Debug.Log("Size: " + actionButtons.Length);
                actionButtons[3].interactable = false;

                bidColor = TrumpColor.undefined;
            }
        }
    }
Beispiel #2
0
 public void BidColorClicked(int color)
 {
     if (bidColor != TrumpColor.undefined)
     {
         SetWhite(colorButtons[(int)bidColor]);
     }
     SetRed(colorButtons[color]);
     bidColor = (TrumpColor)color;
     Debug.Log("Bid color: " + bidColor.ToString());
     if (bidNumber != 0 && bidColor != TrumpColor.undefined)
     {
         actionButtons[3].interactable = true;
     }
 }
Beispiel #3
0
 public void BidColorInitialization()
 {
     if (bidColor != TrumpColor.undefined)
     {
         SetWhite(colorButtons[(int)bidColor]); bidColor = TrumpColor.undefined;
     }
     foreach (Button b in colorButtons)
     {
         b.interactable = true; SetWhite(b);
     }
     if (highestColor != TrumpColor.BA)
     {
         for (int i = 0; i <= (int)highestColor; i++)
         {
             colorButtons[i].interactable = false;
         }
     }
 }