Example #1
0
        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;
        }
Example #2
0
 public BallFactory(Random rand, AppFrame frame)
 {
     this.rand = rand;
     this.frame = frame;
 }
Example #3
0
 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());
 }