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); }
protected virtual void BorderPrototype_OnLookChanged(object sender, EventArgs e) { borderToDraw = (IBorder)BorderPrototype.Clone(); }
/// <summary> /// Clone the BorderPrototype to bordersArry /// </summary> private void RestartBorders() { borderToDraw = (IBorder)BorderPrototype.Clone(); UpdateBordersToNewSizeAndLocation(); }