deleted square

This commit is contained in:
Mees Roelofsz
2023-11-26 16:31:37 +01:00
parent a6554afe5f
commit e0cb5c2417

View File

@@ -10,9 +10,7 @@ let playerPosX = 500
let playerPosY = 300; let playerPosY = 300;
let playerSpeed = 3; let playerSpeed = 3;
let booleanArray = window.booleanArray; let booleanArray = window.booleanArray;
// let squareX = 100;
// let squareY = 100;
// const squareSize = 100;
let shotSpeed = 5; let shotSpeed = 5;
let projectile; let projectile;
@@ -76,18 +74,6 @@ async function Movementloop() {
}); });
} }
// function object_collision() {
// var squareCenterX = squareX + squareSize / 2;
// var squareCenterY = squareY + squareSize / 2;
// var distance = dist(playerPosX, playerPosY, squareCenterX, squareCenterY);
// if (distance < squareSize / 2 + radius) {
// squareX = random(0, width - squareSize);
// squareY = random(0, height - squareSize);
// }
// }
function shoot(directionX, directionY) { function shoot(directionX, directionY) {
shot = true; shot = true;
@@ -135,10 +121,6 @@ function draw() {
score(); score();
text(time, 10, 20); text(time, 10, 20);
// square(squareX,squareY,squareSize);
// object_collision();
if (shot == false) { if (shot == false) {
shoot(playerPosX, playerPosY); shoot(playerPosX, playerPosY);