Variable update

This commit is contained in:
sam
2023-11-28 13:26:59 +01:00
parent 03e6d69de1
commit f4535ba7f8

View File

@@ -68,18 +68,19 @@ async function disconnect() {
} }
//--------------------Game-------------------- //--------------------Game--------------------
let Playerposx = 500; let playerPosX = 500;
let Playerposy = 300; let Playerposy = 300;
let bullets = []; let bullets = [];
let myBullet = new bullet(); let myBullet = new bullet();
let playerSpeed = 5; let playerSpeed = 5;
let radius = 2;
async function Movementloop() { async function Movementloop() {
if (booleanArray[1]) { if (booleanArray[1]) {
Playerposx += 2;} playerPosX += 2;}
if (booleanArray[3]) { if (booleanArray[3]) {
Playerposx -= 2;} playerPosX -= 2;}
if (booleanArray[2]) { if (booleanArray[2]) {
Playerposy += 2;} Playerposy += 2;}
if (booleanArray[0]) { if (booleanArray[0]) {
@@ -116,7 +117,7 @@ function draw(){
background(0,0,0,10); background(0,0,0,10);
// draw a circle at the mouse position // draw a circle at the mouse position
circle(Playerposx, Playerposy, 50); circle(playerPosX, Playerposy, 50);
} }
//test //test
//test2 //test2