Variable update
This commit is contained in:
@@ -68,18 +68,19 @@ async function disconnect() {
|
||||
}
|
||||
//--------------------Game--------------------
|
||||
|
||||
let Playerposx = 500;
|
||||
let playerPosX = 500;
|
||||
let Playerposy = 300;
|
||||
let bullets = [];
|
||||
let myBullet = new bullet();
|
||||
let playerSpeed = 5;
|
||||
let radius = 2;
|
||||
|
||||
|
||||
async function Movementloop() {
|
||||
if (booleanArray[1]) {
|
||||
Playerposx += 2;}
|
||||
playerPosX += 2;}
|
||||
if (booleanArray[3]) {
|
||||
Playerposx -= 2;}
|
||||
playerPosX -= 2;}
|
||||
if (booleanArray[2]) {
|
||||
Playerposy += 2;}
|
||||
if (booleanArray[0]) {
|
||||
@@ -116,7 +117,7 @@ function draw(){
|
||||
background(0,0,0,10);
|
||||
|
||||
// draw a circle at the mouse position
|
||||
circle(Playerposx, Playerposy, 50);
|
||||
circle(playerPosX, Playerposy, 50);
|
||||
}
|
||||
//test
|
||||
//test2
|
Reference in New Issue
Block a user