Beispiel #1
0
 public void FeedAllDyingChicken()
 {
     if (CtxCollection.FindStorage <SeedStorage>().
         Capacity < ToFeed(DyingChickens))
     {
         return;
     }
     foreach (Chicken chicken in DyingChickens)
     {
         chicken.ChickenFeed();
     }
     DyingChickens.Clear();
 }
Beispiel #2
0
        public void Update()
        {
            foreach (Chicken chicken in Chikens)
            {
                chicken.Update();
                if (chicken.CheckIfStarving && !FindDyingChicken(chicken))
                {
                    DyingChickens.Add(chicken);
                }
            }

            if (!CheckIfAllDyingAreFed())
            {
                KillStarvingChicken();
            }
        }