Where is the object being drawn on the GUI? To move the object to the left, decrement its x location value.
Type: Posts; User: Norm
Where is the object being drawn on the GUI? To move the object to the left, decrement its x location value.
There is not enough information about what goLeft() should do to make any recommendations.
Where is the code that controls the displaying of the shape that is to move?
If the shape is moving...
How does the code control the time and the distance that the shape moves?
An example for moving 10 pixels/sec to the left :
If starting location is 100, 10 (x,y)
then one second later
set the...
By velocity do you mean the number of pixels moved per unit of time?
For example: 10 pixels/second
You will need to use a timer to control the time between new positions.
The x,y coordinates...