public GameMovement(MainWindow win, PongBall ball, double x, double y) { this.win = win; this.ball = ball; this.x = x; this.y = y; }
public MainWindow() { InitializeComponent(); PongBall pb = new PongBall(); int x = 0, y = 0; pb.Fill = Brushes.AliceBlue; pb.StrokeThickness = 2; Canvas.SetLeft(pb, x); Canvas.SetTop(pb, y); pongCanvas.Children.Add(pb); gm = new GameMovement(this, pb, 0, 0); }