Exemplo n.º 1
0
 public void PurchaseBall(string ballString)
 {
     GameData.BallType ball = data.StringToBall(ballString);
     if (data.ballPrices[ball] <= data.gems)
     {
         data.ballsPurchased.Add(ball);
         data.gems -= data.ballPrices[ball];
         foreach (var button in shopButtons)
         {
             if (button.ballType == ball)
             {
                 button.GetComponent <AudioSource>().Play();
                 button.GetComponent <Button>().interactable            = false;
                 button.GetComponentInChildren <TextMeshProUGUI>().text = "got";
             }
         }
     }
     selector.UpdateSelection();
     data.Save();
 }
Exemplo n.º 2
0
 public void Select(string ballString)
 {
     GameData.BallType ball = data.StringToBall(ballString);
     data.currentBall = ball;
     UpdateSelection();
 }
Exemplo n.º 3
0
 public void SelectBall(GameData.BallType ball)
 {
     data.currentBall = ball;
     data.Save();
 }