示例#1
0
 public void AddHeart()
 {
     if (SplashKit.Rnd(0, 50000) % 50000 == 0)
     {
         AddHeart buff = new AddHeart(SplashKit.LoadBitmap("heart", "heart.png"));
         moveObject.Add(buff);
     }
 }
示例#2
0
        public void Recover(Chicken c)
        {
            foreach (IMove obj in moveObject)
            {
                if (obj is AddHeart)
                {
                    AddHeart heart = obj as AddHeart;

                    if (heart.Collision(c))
                    {
                        heart.TakeAffect(c);
                        _toDelete.Add(heart);
                    }
                }
            }
        }