void MakeFood() { normfood = new NormalFood(10, 10); gridGame.Children.Add(normfood.Rectangle); normfood.Draw(); deadfood = new DeadFood(30, 10); gridGame.Children.Add(deadfood.Rectangle); deadfood.Draw(); premfood = new PremiumFood(40, 20); gridGame.Children.Add(premfood.Rectangle); premfood.Draw(); }
void MakeFood() { normfoodList.Add(new NormalFood(40, 35)); gridGame.Children.Add(normfoodList.ElementAt(0).Rectangle); normfoodList.ElementAt(0).Draw(); deadfood = new DeadFood(30, 10); gridGame.Children.Add(deadfood.Rectangle); deadfood.Draw(); premfood = new PremiumFood(40, 2); gridGame.Children.Add(premfood.Rectangle); premfood.Draw(); }