Пример #1
0
 public void AddItem()
 {
     if (SplashKit.Rnd(0, 50000) % 50000 == 0)
     {
         BonusItem buff = new BonusItem(SplashKit.LoadBitmap("heart4", "heart4.png"));
         flyObj.Add(buff);
     }
 }
Пример #2
0
        public void Healing(Aircraft a)
        {
            foreach (IFly obj in flyObj)
            {
                if (obj is BonusItem)
                {
                    BonusItem item = obj as BonusItem;

                    if (item.Collision(a))
                    {
                        item.TakeAffect(a);
                        _toRemove.Add(item);
                    }
                }
            }
        }