changed screen size

This commit is contained in:
Mees Roelofsz
2023-12-05 14:37:19 +01:00
parent 4987127a15
commit 4e98b8db9e

View File

@@ -1,7 +1,7 @@
//--------------------Game--------------------
// Game variables
const width = 1000;
const height = 600;
const width = 1260;
const height = 620;
// Player variables
const playerSize = 10;
@@ -12,7 +12,7 @@ let playerSpeed = 4;
let booleanArray = window.booleanArray;
let lives = 1;
let bossPosX = 500;
let bossPosX = width / 2;
let bossPosY = 100;
let shotSpeed = 9;
let projectile;
@@ -73,7 +73,7 @@ function life() {
fill(255, 0, 0);
textSize(40);
textAlign(CENTER);
text("Game Over", 500, 300);
text("Game Over", width/2, height/2);
if (key == ' ') {
lives = 1;
time = 0;
@@ -172,8 +172,8 @@ function draw() {
circle(x4, y4, 50);
circle(x5, y5, 50);
} else {
x2 = bossPosX;
y2 = bossPosY;
x2 = width / 2;
y2 = 100;
}
bullets.forEach(myBullet => {