Esempio n. 1
0
        protected override void OnTick()
        {
            foreach (Item item in World.Items.Values)
            {
                if (item is BaseRegentPlant)
                {
                    BaseRegentPlant plant = (BaseRegentPlant)item;

                    if (plant.Held < 12)
                    {
                        plants.Add(plant);
                    }
                    else if (plant.Held >= 12 && plants.Contains(plant))
                    {
                        plants.Remove(plant);
                    }
                }
            }

            for (int i = 0; i < plants.Count; ++i)
            {
                BaseRegentPlant plant = (BaseRegentPlant)plants[i];

                if (plant.Held < 12)
                {
                    plant.Held += 1;
                }
            }
            Console.WriteLine("Regent Plant Growth Check.");
            GrowthTimer tmr = new GrowthTimer();

            tmr.Start();
            this.Stop();
        }
Esempio n. 2
0
        protected override void OnTick()
        {
            foreach (Item item in World.Items.Values)
            {
                if (item is BaseRegentPlant)
                {
                    BaseRegentPlant plant = (BaseRegentPlant)item;

                    if (plant.Held < 12)
                    {
                        plants.Add(plant);
                    }
                    else if (plant.Held >= 12 && plants.Contains(plant))
                    {
                        plants.Remove(plant);
                    }
                }
            }

            for (int i = 0; i < plants.Count; ++i)
            {
                BaseRegentPlant plant = (BaseRegentPlant)plants[i];

                if (plant.Held < 12)
                    plant.Held += 1;
            }
            Console.WriteLine("Regent Plant Growth Check.");
            GrowthTimer tmr = new GrowthTimer();
            tmr.Start();
            this.Stop();
        }
Esempio n. 3
0
 protected override void OnTick()
 {
     if (i_item.Held >= 13)
     {
         //Console.WriteLine("Working!");
         i_item.Held = i_item.Held + 1;
         this.Stop();
         GrowthTimer newtmr = new GrowthTimer(i_item);
         newtmr.Start();
     }
     else
     {
         this.Stop();
     }
 }
Esempio n. 4
0
 protected override void OnTick()
 {
     if (i_item.Held >= 13)
     {
         //Console.WriteLine("Working!");
         i_item.Held = i_item.Held + 1;
         this.Stop();
         GrowthTimer newtmr = new GrowthTimer(i_item);
         newtmr.Start();
     }
     else
     {
         this.Stop();
     }
 }