Removed player reset on hit

This commit is contained in:
Sam
2023-11-26 23:52:59 +01:00
parent 374c9dd7de
commit c13f5b8f1b

View File

@@ -46,8 +46,6 @@ function life() {
textAlign(CENTER); textAlign(CENTER);
text(lives, 500, 20); text(lives, 500, 20);
if (hit == true) { if (hit == true) {
playerPosX = 500;
playerPosY = 300;
hit = false; hit = false;
lives -= 1; lives -= 1;
} }
@@ -139,7 +137,6 @@ function draw() {
life(); life();
// draw background // draw background
background(0, 0, 0, 100); background(0, 0, 0, 100);
if (!(lives == 0)) { if (!(lives == 0)) {
// draw player // draw player
fill(0, 255, 255) fill(0, 255, 255)