Beispiel #1
0
        public void BallOperation()
        {
            if (ball.StopMove)
            {
                ball.Location = new Point(ball.Location.X + disk.dx, ball.Location.Y);
            }
            else
            {
                if (ballTouchWall() || ballTouchTable())
                {
                    ballTouchTable();
                }
                ball.ChangeDirection();
                ball.Move();
            }

            if (ballTouchStopRegionOfDisk())
            {
                ball.StopMove = true;
                ball.Location = ball.LastMove;
            }

            ball.Draw(g);
        }
 private void FixedUpdate()
 {
     // Call the Move function of the ball controller
     ball.Move(move, jump);
     jump = false;
 }