keyPressed
in
Programming Questions
•
2 months ago
Hi,
In this project http://www.openprocessing.org/sketch/1088 by pressing the letter "w" the motorcycle jump, the code is:
it is possible that there is only a jump even if I press continuously the letter "w"?
thanks for the help
In this project http://www.openprocessing.org/sketch/1088 by pressing the letter "w" the motorcycle jump, the code is:
- if (key == 'w')
{
motorcycle.jump ();
}
void jump ()
{
if (jumping)
{
jumping = true;
jumpSpeed = initialJumpSpeed;
h1 - = jumpSpeed;
h2 - = jumpSpeed;
jumpSpeed - = gravity;
}
it is possible that there is only a jump even if I press continuously the letter "w"?
thanks for the help
1