diff --git a/sketch.js b/sketch.js index 67f4167..edd5835 100644 --- a/sketch.js +++ b/sketch.js @@ -92,6 +92,13 @@ function GameCharacter() { } this._drawEyes = function (draw_left, draw_right, eyes_height) { fill(0); + if (this.curLives <= 0) { + textAlign(CENTER); + textSize(this.x_step*2); + text("x", this.x - this.x_step * 1.2, this.y - this.y_step * eyes_height); + text("x", this.x + this.x_step * 1.2, this.y - this.y_step * eyes_height); + } + else { if (draw_left) { ellipse( this.x - this.x_step * 1.2, @@ -109,6 +116,7 @@ function GameCharacter() { ); } } + } this._updateSprite(); push(); strokeWeight(1); @@ -669,7 +677,7 @@ function generateObjects() { max( random( prev.y - prev.max_y_deviation, - floorPos_y - prev.max_y_deviation, + floorPos_y - prev.max_y_deviation/2, ), height / 8, ),