See my reply to your previous post Re: More Pong in SDL.
$paddle->y is a 'getter' method to get the y position of the $paddle object.
$paddle->y(value) is a 'setter' method to set the y position of the $paddle object.
So the code $paddle->y( $paddle->y + ( $v_y * $step ) )increment the y position by the velocity * step
Also there is an error in line 155.
poj#return of $A->left > $B->right; return if $A->left > $B->right;
In reply to Re: Movement handlers in SDL
by poj
in thread Movement handlers in SDL
by drose2211
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |