Exemplo n.º 1
0
 void ChangeColor(string id)
 {
     if (id == "NoBingo")
     {
         foreach (GameObject Ballnbr in Ball)
         {
             if (Ballnbr.GetComponent <Ball> ().isSelected)
             {
                 Ballnbr.GetComponent <Ball> ().imgBall.color = TemplateColor.m_instance.ColorsList[GlobalVariables.m_instance.IDTemplate].ColorBallsNearBingo;
             }
         }
         this.transform.parent.gameObject.GetComponent <Image> ().color = TemplateColor.m_instance.ColorsList[GlobalVariables.m_instance.IDTemplate].ColorCardNearBingo;
     }
     else if (id == "Bingo")
     {
         foreach (GameObject Ballnbr in Ball)
         {
             Ballnbr.GetComponent <Ball> ().imgBall.color  = Color.white;
             Ballnbr.GetComponent <Ball> ().imgBall.sprite = circle;
             Ballnbr.GetComponent <Ball> ().textBall.color = new Color(0.2F, 0.2F, 0.2F, 1F);
             Ballnbr.GetComponent <Ball> ().isSelected     = true;
         }
         this.transform.parent.gameObject.GetComponent <Image> ().color = TemplateColor.m_instance.ColorsList[GlobalVariables.m_instance.IDTemplate].ColorCardsNoSelected;
         GameManager.m_instance.Bingo();
     }
 }
Exemplo n.º 2
0
 public void CheckIfNumber(int nbr)
 {
     foreach (GameObject Ballnbr in Ball)
     {
         if (Ballnbr.GetComponent <Ball> ().textBall.text == nbr.ToString())
         {
             Ballnbr.GetComponent <Ball> ().imgBall.color  = TemplateColor.m_instance.ColorsList[GlobalVariables.m_instance.IDTemplate].ColorBallsSelected;
             Ballnbr.GetComponent <Ball> ().imgBall.sprite = circle;
             Ballnbr.GetComponent <Ball> ().textBall.color = Color.white;
             Ballnbr.GetComponent <Ball> ().isSelected     = true;
         }
     }
     CheckIfBingo();
 }
Exemplo n.º 3
0
 public void ResetCard()
 {
     foreach (GameObject Ballnbr in Ball)
     {
         Ballnbr.GetComponent <Ball> ().imgBall.color  = Color.white;
         Ballnbr.GetComponent <Ball> ().imgBall.sprite = circle;
         Ballnbr.GetComponent <Ball> ().textBall.color = new Color(0.2F, 0.2F, 0.2F, 1F);
         Ballnbr.GetComponent <Ball> ().isSelected     = false;
     }
     this.transform.parent.gameObject.GetComponent <Image> ().color         = TemplateColor.m_instance.ColorsList[GlobalVariables.m_instance.IDTemplate].ColorCardsNoSelected;
     this.transform.parent.gameObject.GetComponent <Button> ().interactable = true;
     remaningBallsCard = 15;
     isSelected        = false;
     GlobalVariables.m_instance.CardBoardSelected = 0;
     GlobalUI.m_instance.PrebuyMoneyText.text     = "Total : $0";
     initCardBoard();
 }