예제 #1
0
        protected override Game.Characters.Item Copy()
        {
            Board board = new BoardGame.Board();

            board.Ball              = (IBall)Ball.Clone();
            board.Plank             = (IPlank)Plank.Clone();
            board.BorderPrototype   = (IBorder)BorderPrototype.Clone();
            board.borderToDraw      = (IBorder)borderToDraw.Clone();
            board.WidthOfBorders    = WidthOfBorders;
            board.Turns             = Turns;
            board.IsPause           = IsPause;
            board.IsEndGame         = IsEndGame;
            board.IsGameStart       = IsGameStart;
            board.IntervalBallSpeed = IntervalBallSpeed;
            return(board);
        }
예제 #2
0
 protected virtual void BorderPrototype_OnLookChanged(object sender, EventArgs e)
 {
     borderToDraw = (IBorder)BorderPrototype.Clone();
 }
예제 #3
0
 /// <summary>
 /// Clone the BorderPrototype to bordersArry
 /// </summary>
 private void RestartBorders()
 {
     borderToDraw = (IBorder)BorderPrototype.Clone();
     UpdateBordersToNewSizeAndLocation();
 }