Added conditions to if statements for movement
This commit is contained in:
@@ -72,13 +72,13 @@ let Playerposx = 500;
|
||||
let Playerposy = 300;
|
||||
|
||||
|
||||
if (booleanArray[1]) {
|
||||
Playerposx += 1;}
|
||||
if (booleanArray[3]) {
|
||||
if (booleanArray[1] = true) {
|
||||
Playerposx + 1;}
|
||||
if (booleanArray[3] = true) {
|
||||
Playerposx -= 1;}
|
||||
if (booleanArray[0]) {
|
||||
if (booleanArray[0] = true) {
|
||||
Playerposy += 1;}
|
||||
if (booleanArray[2]) {
|
||||
if (booleanArray[2] = true) {
|
||||
Playerposy -= 1;}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user