Esempio n. 1
0
 void LooseAllBabies()
 {
     while (babies.Count > 0)
     {
         BabyController b = babies[0];
         babies.Remove(b);
         b.FreeAttachment();
     }
 }
Esempio n. 2
0
 private void Update()
 {
     for (int i = babyFruits.Count - 1; i >= 0; i--)
     {
         BabyController baby = babyFruits[i];
         if (baby == null)
         {
             babyFruits.RemoveAt(i);
         }
         else if (Mathf.Abs(player.position.x - baby.transform.position.x) < dropRange)
         {
             baby.FreeAttachment();
             babyFruits.Remove(baby);
         }
     }
 }