Removed player reset on hit
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user