示例#1
0
 public void RemovePack()
 {
     if (numSelections <= 0)
     {
         return;
     }
     selectedPacks.RemoveAt(--numSelections);
     totalSelections--;
     selectedIcons[numSelections].color = CustomColor.Convert255(255, 255, 255);
     if (PacksDeselected != null)
     {
         PacksDeselected();
     }
 }
示例#2
0
        public void AddPack(int index)
        {
            if (numSelections >= MAX_SELECTIONS)
            {
                return;
            }
            selectedPacks.Add(index);

            selectedIcons[numSelections++].color = CustomColor.Convert255(0, 92, 122);
            totalSelections++;

            if (totalSelections >= MAX_SELECTIONS * 2)
            {
                if (PacksSelected != null)
                {
                    PacksSelected();
                }
            }
        }
示例#3
0
 private void UpdateCardInfo(CardSystem.Card card, int playerIndex)
 {
     if (playerIndex != thisPlayerIndex)
     {
         return;
     }
     if (cards[cardToUse] == "")
     {
         currentCardName.text = "None";
     }
     else
     {
         currentCardName.text = cardToUse + 1 >= MAX_HAND ? "None" : cards[cardToUse + 1];
         hand[cardToUse].transform.GetChild(CHILD_IMAGE_INDEX).GetComponent <Image>().sprite = defaultImage;
         hand[cardToUse].transform.GetChild(CHILD_IMAGE_INDEX).GetComponent <Image>().color  = Color.black;
         hand[cardToUse].color = CustomColor.Convert255(128.0f, 128.0f, 128.0f);
     }
     cardToUse++;
 }
 public void UpdateFinalDisplayData()
 {
     for (int i = 0; i < MAX_SELECTIONS; i++)
     {
         if (i < finalMap.Count)
         {
             finalButtons[i].color = CustomColor.Convert255(0, 92, 122);
         }
         else
         {
             finalButtons[i].color = CustomColor.Convert255(255, 255, 255);
         }
     }
     if (totalSelections >= MAX_SELECTIONS * 2 || selectionOptions == null || totalSelections >= selectionOptions.Count)
     {
         if (CardsSelected != null)
         {
             CardsSelected();
         }
     }
 }