changed framerate and fixed controls
This commit is contained in:
@@ -75,13 +75,13 @@ let Playerposy = 300;
|
|||||||
|
|
||||||
async function Movementloop() {
|
async function Movementloop() {
|
||||||
if (booleanArray[1]) {
|
if (booleanArray[1]) {
|
||||||
Playerposx + 1;}
|
Playerposx += 2;}
|
||||||
if (booleanArray[3]) {
|
if (booleanArray[3]) {
|
||||||
Playerposx -= 1;}
|
Playerposx -= 2;}
|
||||||
if (booleanArray[0]) {
|
|
||||||
Playerposy += 1;}
|
|
||||||
if (booleanArray[2]) {
|
if (booleanArray[2]) {
|
||||||
Playerposy -= 1;}
|
Playerposy += 2;}
|
||||||
|
if (booleanArray[0]) {
|
||||||
|
Playerposy -= 2;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ if (booleanArray[2]) {
|
|||||||
function setup(){
|
function setup(){
|
||||||
// create a canvas element and append it to the body
|
// create a canvas element and append it to the body
|
||||||
createCanvas(1250, 600);
|
createCanvas(1250, 600);
|
||||||
|
frameRate(244);
|
||||||
// disable the outline of shapes
|
// disable the outline of shapes
|
||||||
noStroke();
|
noStroke();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user