I am making a simple game in javascript where a player jumps over an oncoming car. Right now the character will jump over the first car, but then it will not jump again. Here is my jumping code:
this.isJumping = function(){
var y=player.y;
var jumping=false;
if (y<=area.canvas.height - 200){
jumping=false}
return jumping;
}
How can I make it so that the player (a component) will jump again after reaching the ground, but not jump again in air?
this.isJumping = function(){
var y=player.y;
var jumping=false;
if (y<=area.canvas.height - 200){
jumping=false}
return jumping;
}
How can I make it so that the player (a component) will jump again after reaching the ground, but not jump again in air?

