From c448e2822381a47e9e7ef8c0130a73a05a1bc229 Mon Sep 17 00:00:00 2001 From: Mottributo <87079566+Mottributo@users.noreply.github.com> Date: Mon, 27 Mar 2023 00:02:55 +0300 Subject: [PATCH] lower enemies, crossed eyes of gamechar --- sketch.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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, ),