private void DetermineMovement(Ball ballToTrack)
{
//Move paddle towards ball
if (ballToTrack != null)
{
if (ballToTrack.Position.Y > Position.Y + Height/2)
{
SetDirection(_speed);
}
if (ballToTrack.Position.Y < Position.Y + Height/2)
{
SetDirection(-_speed);
}
}
//Don't move when not! tracking a ball
else
{
_yVelocity = 0;
}
}