Example #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));
     }
 }
Example #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));
            }
        }