Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shazee-04 authored Jul 2, 2024
1 parent 4c3bd33 commit d502c2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function movement(event) {
}
}
if (isdead == 0) {
if (event.key == "d") {
if (event.key == "d" || event.keyCode == '39') {
if (scoreworker != 0) {
if (runfworker == 0) {
if (runbworker == 0) {
Expand All @@ -48,7 +48,7 @@ function movement(event) {
}
}

if (event.key == "a") {
if (event.key == "a" || event.keyCode == '37') {
if (scoreworker != 0) {
if (runbworker == 0) {
if (runfworker == 0) {
Expand All @@ -64,7 +64,7 @@ function movement(event) {
}
}

if (event.key == "w") {
if (event.key == "w" || event.keyCode == '38') {
if (scoreworker != 0) {
if (jumpworker == 0) {
if (intervalworker == 0) {
Expand All @@ -81,7 +81,7 @@ function movement(event) {
}
}

if (event.key == "s") {
if (event.key == "s" || event.keyCode == '40') {
if (scoreworker != 0) {
if (jumpworker == 0) {
if (runfworker == 0) {
Expand Down Expand Up @@ -670,4 +670,4 @@ function restartgame() {

idle();
updatescore();
}
}

0 comments on commit d502c2c

Please sign in to comment.