Пример #1
0
 public void SetMemento(BallsMemento memento)
 {
     balls.Clear();
     List<MBall> mBalls = memento.GetMemento();
     foreach(MBall ball in mBalls)
     {
         balls.Add(new BBControl(ball.X, ball.Y, ball.Dx, ball.Dy, ball.Width, ball.Height));
     }
 }
Пример #2
0
        public void SetMemento(BallsMemento memento)
        {
            balls.Clear();
            List <MBall> mBalls = memento.GetMemento();

            foreach (MBall ball in mBalls)
            {
                balls.Add(new BBControl(ball.X, ball.Y, ball.Dx, ball.Dy, ball.Width, ball.Height));
            }
        }