Exemplo n.º 1
0
 void Update()
 {
     foreach (Transform child in PollenDisplayList.transform)
     {
         PollenDisplay display = child.GetComponent <PollenDisplay>();
         if (display)
         {
             if (display.flowerType != null)
             {
                 float pollen = PlayerInventory.Instance.GetPollen(display.flowerType.Id);
                 if (pollen > 0)
                 {
                     display.Show();
                     display.DisplayPollen((int)pollen);
                 }
                 else
                 {
                     display.Hide();
                 }
             }
             else
             {
                 display.Hide();
             }
         }
     }
 }
Exemplo n.º 2
0
 void DisplayPollenCosts(ShopItemCost[] costs)
 {
     foreach (Transform child in PollenDisplayList.transform)
     {
         PollenDisplay display = child.GetComponent <PollenDisplay>();
         if (display)
         {
             if (display.flowerType != null)
             {
                 display.Hide();
                 foreach (ShopItemCost cost in costs)
                 {
                     if (display.flowerType == cost.Flower)
                     {
                         display.Show();
                         display.DisplayPollen(cost.Pollen);
                     }
                 }
             }
             else
             {
                 display.Hide();
             }
         }
     }
 }
Exemplo n.º 3
0
 void ClearPollenCosts()
 {
     foreach (Transform child in PollenDisplayList.transform)
     {
         PollenDisplay display = child.GetComponent <PollenDisplay>();
         if (display)
         {
             display.Hide();
         }
     }
 }