fixed radius
This commit is contained in:
@@ -69,11 +69,11 @@ async function disconnect() {
|
||||
//--------------------Game--------------------
|
||||
|
||||
let playerPosX = 500;
|
||||
let Playerposy = 300;
|
||||
let playerPosY = 300;
|
||||
let bullets = [];
|
||||
let myBullet = new bullet();
|
||||
let playerSpeed = 5;
|
||||
let radius = 2;
|
||||
let radius = 20;
|
||||
let myBullet = new bullet();
|
||||
|
||||
|
||||
async function Movementloop() {
|
||||
@@ -82,9 +82,9 @@ if (booleanArray[1]) {
|
||||
if (booleanArray[3]) {
|
||||
playerPosX -= 2;}
|
||||
if (booleanArray[2]) {
|
||||
Playerposy += 2;}
|
||||
playerPosY += 2;}
|
||||
if (booleanArray[0]) {
|
||||
Playerposy -= 2;}
|
||||
playerPosY -= 2;}
|
||||
}
|
||||
function keyPressed() {
|
||||
if (keyIsDown(LEFT_ARROW) && playerPosX > 0 + radius) {
|
||||
@@ -117,7 +117,7 @@ function draw(){
|
||||
background(0,0,0,10);
|
||||
|
||||
// draw a circle at the mouse position
|
||||
circle(playerPosX, Playerposy, 50);
|
||||
circle(playerPosX, playerPosY, radius);
|
||||
}
|
||||
//test
|
||||
//test2
|
Reference in New Issue
Block a user