Example #1
0
        public List <AppleView> AddAppleViews(Panel p_Map)
        {
            List <AppleView> listViewApple = new List <AppleView>();

            for (int i = 0; i < gameModel.listApple.Count; i++)
            {
                AppleView viewApple = new AppleView(p_Map);
                viewApple.Model         = gameModel.listApple[i];
                viewApple.Model.MapSize = new Point(p_Map.Width, p_Map.Height);
                viewApple.Subscribe();
                listViewApple.Add(viewApple);
            }
            return(listViewApple);
        }
Example #2
0
 public Apple()
 {
     appleView = new AppleView(new Point(X, Y), Properties.Resources.Apple);
     ownHeight = GameModel.appleImage.Height;
     ownWidth  = GameModel.appleImage.Width;
 }