Added async movement loop function
This commit is contained in:
@@ -74,13 +74,13 @@ let Playerposy = 300;
|
|||||||
|
|
||||||
|
|
||||||
async function Movementloop() {
|
async function Movementloop() {
|
||||||
if (booleanArray[1] = true) {
|
if (booleanArray[1]) {
|
||||||
Playerposx + 1;}
|
Playerposx + 1;}
|
||||||
if (booleanArray[3] = true) {
|
if (booleanArray[3]) {
|
||||||
Playerposx -= 1;}
|
Playerposx -= 1;}
|
||||||
if (booleanArray[0] = true) {
|
if (booleanArray[0]) {
|
||||||
Playerposy += 1;}
|
Playerposy += 1;}
|
||||||
if (booleanArray[2] = true) {
|
if (booleanArray[2]) {
|
||||||
Playerposy -= 1;}
|
Playerposy -= 1;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user