Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
4f936aaa42
2 changed files with 24 additions and 4 deletions
|
|
@ -206,8 +206,7 @@ function keyPressed() {
|
|||
if (!ready) return;
|
||||
// Jump
|
||||
if (BOOST_KEYS.includes(key.toLowerCase())) {
|
||||
resetScore();
|
||||
raspberry.boost();
|
||||
playerInput();
|
||||
}
|
||||
|
||||
// Pause the Game
|
||||
|
|
@ -217,3 +216,24 @@ function keyPressed() {
|
|||
paused = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mouse clicked event.
|
||||
*/
|
||||
function mouseClicked() {
|
||||
if (!ready) return;
|
||||
|
||||
if (paused) {
|
||||
paused = false;
|
||||
}
|
||||
|
||||
playerInput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles input for the player, when a key is pressed, or the mouse is clicked.
|
||||
*/
|
||||
function playerInput() {
|
||||
resetScore();
|
||||
raspberry.boost();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue