private Point point; // TopLeft (sorry, this is not the origo, but it has to be that one!) #endregion Fields #region Constructors public Ball(Color color, Point point, double speed, double radius, AppFrame frame, double angle) { this.color = color; this.frame = frame; this.point = point; this.speed = speed; this.radius = radius; this.angle = angle; }
public BallFactory(Random rand, AppFrame frame) { this.rand = rand; this.frame = frame; }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.frame = new AppFrame(this.rand, this.canvas.ActualWidth, this.canvas.ActualHeight); this.ballFactory = new BallFactory(this.rand, this.frame); this.canvas.Children.Add(this.frame.getRect()); }