public void AddHeart() { if (SplashKit.Rnd(0, 50000) % 50000 == 0) { AddHeart buff = new AddHeart(SplashKit.LoadBitmap("heart", "heart.png")); moveObject.Add(buff); } }
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); } } } }