コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: SnakeGame1.xaml.cs プロジェクト: rudzia/uczelnia
        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();
        }